Commit 3399abdf authored by Mike Hibler's avatar Mike Hibler

Hopefully fix frisbee uploader "no such file or directory" errors.

When using AMD, the uploader path wound up "realpath"ed in the form
of /.amd_mnt/ops/... which is the location at which AMD does the NFS
mount when triggered. However, if the mount times out, that path is
no longer valid.

So for the AMD case, we have to strip the AMD prefix from the path.
This ensures that subsequent stats and other accesses of the path go
through the AMD mountpoint (e.g., "/proj/foo") and not the NFS mountpoint
(e.g., "/.amd_mnt/ops/proj/foo"), and thus trigger AMD to do the NFS mount.
parent 475598b2
......@@ -1655,6 +1655,23 @@ emulab_get_host_authinfo(struct in_addr *req, struct in_addr *host,
continue;
}
/*
* XXX for the AMD case, we have to strip the AMD
* prefix from the path. This is to ensure that
* stats and other accesses of the path go through
* the AMD mountpoint (e.g., "/proj/foo") and not the
* NFS mountpoint (e.g., "/.amd_mnt/ops/proj/foo"),
* and thus trigger AMD to do the NFS mount when the
* FS is not already mounted.
*/
if (AMDROOT) {
int arlen = strlen(AMDROOT);
if (strncmp(AMDROOT, targetpath, arlen) == 0) {
targetpath += arlen;
assert(targetpath[0] == '/');
}
}
iid = build_imageid(row[0], row[2], row[5], wantmeta);
ci = &put->imageinfo[put->numimages];
ci->imageid = iid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment