Commit 77291188 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Make sure that we export top level groups directory to shared hosts,

and that we return the group mount to the vnode so that it can be
mounted inside the VM.
parent 40e7cd19
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2010 University of Utah and the Flux Group.
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
......@@ -254,6 +254,7 @@ while ($row = $nodes_result->fetchrow_hashref) {
# Shared local nodes get toplevel mounts.
#
push(@dirlist, "$projdir");
push(@dirlist, "$groupdir");
push(@dirlist, "$scratchdir")
if ($scratchdir && -d "$SCRATCHROOT");
push(@dirlist, "$usersdir");
......
......@@ -3976,6 +3976,15 @@ COMMAND_PROTOTYPE(domounts)
client_writeback(sock, buf, strlen(buf), tcp);
/* Leave this logging on all the time for now. */
info("MOUNTS: %s", buf);
bufp = buf;
if (!nomounts)
bufp += OUTPUT(bufp, ebufp-bufp,
"REMOTE=%s ", FSGROUPDIR);
OUTPUT(bufp, ebufp-bufp, "LOCAL=%s\n", GROUPDIR);
client_writeback(sock, buf, strlen(buf), tcp);
/* Leave this logging on all the time for now. */
info("MOUNTS: %s", buf);
return 0;
}
else if (!usesfs) {
......@@ -3992,6 +4001,23 @@ COMMAND_PROTOTYPE(domounts)
/* Leave this logging on all the time for now. */
info("MOUNTS: %s", buf);
/*
* If pid!=gid, then this is group experiment, and we return
* a mount for the group directory too.
*/
if (strcmp(reqp->pid, reqp->gid)) {
bufp = buf;
if (!nomounts)
bufp += OUTPUT(bufp, ebufp-bufp,
"REMOTE=%s/%s/%s ", FSGROUPDIR,
reqp->pid, reqp->gid);
OUTPUT(bufp, ebufp-bufp, "LOCAL=%s/%s/%s\n",
GROUPDIR, reqp->pid, reqp->gid);
client_writeback(sock, buf, strlen(buf), tcp);
/* Leave this logging on all the time for now. */
info("MOUNTS: %s", buf);
}
/*
* Skip all this for a vnode; client does not ask.
*/
......@@ -4026,22 +4052,6 @@ COMMAND_PROTOTYPE(domounts)
/* Leave this logging on all the time for now. */
info("MOUNTS: %s", buf);
#endif
/*
* If pid!=gid, then this is group experiment, and we return
* a mount for the group directory too.
*/
if (strcmp(reqp->pid, reqp->gid)) {
bufp = buf;
if (!nomounts)
bufp += OUTPUT(bufp, ebufp-bufp,
"REMOTE=%s/%s/%s ", FSGROUPDIR,
reqp->pid, reqp->gid);
OUTPUT(bufp, ebufp-bufp, "LOCAL=%s/%s/%s\n",
GROUPDIR, reqp->pid, reqp->gid);
client_writeback(sock, buf, strlen(buf), tcp);
/* Leave this logging on all the time for now. */
info("MOUNTS: %s", buf);
}
}
else if (usesfs) {
/*
......
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