Commit a61005ab authored by Leigh B. Stoller's avatar Leigh B. Stoller

Change SFS mounts to widearea nodes. Return /proj, /users, /groups,

and /share, all rooted in /netbed. This is convenient! New images have
symlinks pointing /{proj,groups,share} into /netbed.
parent 4d44c8b0
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#define PROJDIR "/proj" #define PROJDIR "/proj"
#define GROUPDIR "/groups" #define GROUPDIR "/groups"
#define USERDIR "/users" #define USERDIR "/users"
#define NETBEDDIR "/netbed"
#define SHAREDIR "/share" #define SHAREDIR "/share"
#define RELOADPID "emulab-ops" #define RELOADPID "emulab-ops"
#define RELOADEID "reloading" #define RELOADEID "reloading"
...@@ -2500,15 +2501,6 @@ COMMAND_PROTOTYPE(domounts) ...@@ -2500,15 +2501,6 @@ COMMAND_PROTOTYPE(domounts)
} }
} }
else { else {
#ifdef FSSHAREDIR
/*
* Pointer to /share.
*/
sprintf(buf, "SFS REMOTE=%s%s LOCAL=%s\n",
fshostid, FSDIR_SHARE, SHAREDIR);
client_writeback(sock, buf, strlen(buf), tcp);
info("MOUNTS: %s", buf);
#endif
/* /*
* Return SFS-based mounts. Locally, we send back per * Return SFS-based mounts. Locally, we send back per
* project/group mounts (really symlinks) cause thats the * project/group mounts (really symlinks) cause thats the
...@@ -2534,38 +2526,66 @@ COMMAND_PROTOTYPE(domounts) ...@@ -2534,38 +2526,66 @@ COMMAND_PROTOTYPE(domounts)
client_writeback(sock, buf, strlen(buf), tcp); client_writeback(sock, buf, strlen(buf), tcp);
info("MOUNTS: %s", buf); info("MOUNTS: %s", buf);
} }
#ifdef FSSHAREDIR
/*
* Pointer to /share.
*/
sprintf(buf, "SFS REMOTE=%s%s LOCAL=%s\n",
fshostid, FSDIR_SHARE, SHAREDIR);
client_writeback(sock, buf, strlen(buf), tcp);
info("MOUNTS: %s", buf);
#endif
/* /*
* Return a mount for "certprog dirsearch" * Return a mount for "certprog dirsearch"
* that matches the local convention. This * that matches the local convention. This
* allows the same paths to work on remote * allows the same paths to work on remote
* nodes. * nodes.
*/ */
sprintf(buf, "SFS REMOTE=%s%s/%s LOCAL=%s/%s\n", sprintf(buf, "SFS REMOTE=%s%s/%s LOCAL=%s%s\n",
fshostid, FSDIR_PROJ, DOTSFS, PROJDIR, DOTSFS); fshostid, FSDIR_PROJ, DOTSFS, PROJDIR, DOTSFS);
client_writeback(sock, buf, strlen(buf), tcp); client_writeback(sock, buf, strlen(buf), tcp);
} }
else { else {
/* /*
* Remote nodes get slightly different mounts.
* in /netbed.
*
* Pointer to /proj. * Pointer to /proj.
*/ */
sprintf(buf, "SFS REMOTE=%s%s LOCAL=%s\n", sprintf(buf, "SFS REMOTE=%s%s LOCAL=%s/%s\n",
fshostid, FSDIR_PROJ, PROJDIR); fshostid, FSDIR_PROJ, NETBEDDIR, PROJDIR);
client_writeback(sock, buf, strlen(buf), tcp); client_writeback(sock, buf, strlen(buf), tcp);
info("MOUNTS: %s", buf); info("MOUNTS: %s", buf);
/* /*
* Pointer to /groups * Pointer to /groups
*/ */
sprintf(buf, "SFS REMOTE=%s%s LOCAL=%s\n", sprintf(buf, "SFS REMOTE=%s%s LOCAL=%s%s\n",
fshostid, FSDIR_GROUPS, GROUPDIR); fshostid, FSDIR_GROUPS, NETBEDDIR, GROUPDIR);
client_writeback(sock, buf, strlen(buf), tcp);
info("MOUNTS: %s", buf);
/*
* Pointer to /users
*/
sprintf(buf, "SFS REMOTE=%s%s LOCAL=%s%s\n",
fshostid, FSDIR_USERS, NETBEDDIR, USERDIR);
client_writeback(sock, buf, strlen(buf), tcp); client_writeback(sock, buf, strlen(buf), tcp);
info("MOUNTS: %s", buf); info("MOUNTS: %s", buf);
#ifdef FSSHAREDIR
/*
* Pointer to /share.
*/
sprintf(buf, "SFS REMOTE=%s%s LOCAL=%s%s\n",
fshostid, FSDIR_SHARE, NETBEDDIR, SHAREDIR);
client_writeback(sock, buf, strlen(buf), tcp);
info("MOUNTS: %s", buf);
#endif
} }
} }
/* /*
* Remote nodes do not get user mounts at this point. * Remote nodes do not get per-user mounts. See above.
*/ */
if (!reqp->islocal) if (!reqp->islocal)
return 0; return 0;
......
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