Commit e664ad58 authored by Kirk Webb's avatar Kirk Webb

A couple of things:

1) Added PLAB_SLICEPREFIX so that we can separately instantiate plab slices
from mini, or elsewhere.  On the mainbed, its set to "emulab".  On mini, its
set to "emulab_mini".  The "emulab" part has to exist first so that the new
plab node manager doesn't nuke our dslice slivers.

2) Fixed up Plab.getFree() so that it doesn't try to add the same IP twice
to the DB if a new one is found, and listed more than once.
parent 7f6794ad
......@@ -866,6 +866,7 @@ fi
#
......@@ -908,6 +909,7 @@ IPBASE=10
SFSSUPPORT=1
PLABSUPPORT=0
PLAB_ROOTBALL="plabroot-8.tgz"
PLAB_SLICEPREFIX="emulab"
TBLOGFACIL="local5"
#
......@@ -1292,7 +1294,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1296: checking for a BSD compatible install" >&5
echo "configure:1298: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
......@@ -1639,6 +1641,7 @@ s%@SFSSUPPORT@%$SFSSUPPORT%g
s%@PLABSUPPORT@%$PLABSUPPORT%g
s%@TBLOGFACIL@%$TBLOGFACIL%g
s%@PLAB_ROOTBALL@%$PLAB_ROOTBALL%g
s%@PLAB_SLICEPREFIX@%$PLAB_SLICEPREFIX%g
s%@TBOPSEMAIL@%$TBOPSEMAIL%g
s%@TBOPSEMAIL_NOSLASH@%$TBOPSEMAIL_NOSLASH%g
s%@TBLOGSEMAIL@%$TBLOGSEMAIL%g
......
......@@ -59,6 +59,7 @@ AC_SUBST(SFSSUPPORT)
AC_SUBST(PLABSUPPORT)
AC_SUBST(TBLOGFACIL)
AC_SUBST(PLAB_ROOTBALL)
AC_SUBST(PLAB_SLICEPREFIX)
#
# Offer both versions of the email addresses that have the @ escaped
......@@ -100,6 +101,7 @@ IPBASE=10
SFSSUPPORT=1
PLABSUPPORT=0
PLAB_ROOTBALL="plabroot-8.tgz"
PLAB_SLICEPREFIX="emulab"
TBLOGFACIL="local5"
#
......
......@@ -27,3 +27,4 @@ WWW=www.mini.emulab.net/~barb/www
TBCOOKIESUFFIX=-mini
THISHOMEBASE=Mini.Emulab.Net
FS_WITH_QUOTAS="/z"
PLAB_SLICEPREFIX=emulab_mini
......@@ -33,3 +33,4 @@ WWWHOST=www.emulab.net
TBMAINSITE=1
THISHOMEBASE=Emulab.Net
PLABSUPPORT=1
PLAB_SLICEPREFIX=emulab
......@@ -2,10 +2,10 @@
# This is the definitions file for Kirk on Emulab.Net.
#
TBDBNAME=tbdb
TBOPSEMAIL=kwebb@cs.utah.edu
TBLOGSEMAIL=kwebb@cs.utah.edu
TBWWWEMAIL=kwebb@cs.utah.edu
TBAUDITEMAIL=kwebb@cs.utah.edu
TBOPSEMAIL=kwebb@flux.utah.edu
TBLOGSEMAIL=kwebb@flux.utah.edu
TBWWWEMAIL=kwebb@flux.utah.edu
TBAUDITEMAIL=kwebb@flux.utah.edu
BOSSNODE=boss.emulab.net
USERNODE=users.emulab.net
FSNODE=fs.emulab.net
......@@ -14,9 +14,9 @@ DELAYCAPACITY=2
FSDIR_GROUPS=/q/groups
FSDIR_PROJ=/q/proj
FSDIR_USERS=/users
TBSTATEDEMAIL=kwebb@cs.utah.edu
TBTESTSUITEEMAIL=kwebb@cs.utah.edu
TBSTATEDEMAIL=kwebb@flux.utah.edu
TBTESTSUITEEMAIL=kwebb@flux.utah.edu
WWWHOST=www.emulab.net
WWW=www.emulab.net/~kwebb/www
WWW=www.emulab.net/dev/kwebb
FS_WITH_QUOTAS="/q /users"
PLABSUPPORT=1
......@@ -30,3 +30,4 @@ SFSSUPPORT=0
WWWHOST=www.mini.emulab.net
TBCOOKIESUFFIX=-mini
THISHOMEBASE=Mini.Emulab.Net
PLAB_SLICEPREFIX=emulab_mini
......@@ -25,3 +25,4 @@ TBCOOKIESUFFIX=-mini
THISHOMEBASE=Mini.Emulab.Net
TBAUTHTIMEOUT=216000
FS_WITH_QUOTAS="/z"
PLAB_SLICEPREFIX=emulab_mini
......@@ -30,3 +30,4 @@ WWW=www.mini.emulab.net/~ricci/www
TBCOOKIESUFFIX=-mini
THISHOMEBASE=Mini.Emulab.Net
FS_WITH_QUOTAS="/z"
PLAB_SLICEPREFIX=emulab_mini
......@@ -30,3 +30,4 @@ WWW=www.mini.emulab.net/dev/shash
TBCOOKIESUFFIX=-mini
THISHOMEBASE=Mini-Shash.Emulab.Net
FS_WITH_QUOTAS="/z"
PLAB_SLICEPREFIX=emulab_mini
......@@ -28,3 +28,4 @@ WWW=www.mini.emulab.net/~stoller/www
TBCOOKIESUFFIX=-mini
THISHOMEBASE=Stoller.Mini.Emulab.Net
FS_WITH_QUOTAS="/z"
PLAB_SLICEPREFIX=emulab_mini
......@@ -68,6 +68,7 @@ HTTP_PATH = "/" # ensure this ends in a slash
ROOTBALL_HTTP_URLPATH = HTTPD_SITE + HTTPD_PORT + HTTP_PATH
DEF_ROOTBALL_NAME = "@PLAB_ROOTBALL@"
SLICEPREFIX = "@PLAB_SLICEPREFIX@"
#
# How many seconds to sleep between failures and how many times to try
......@@ -635,7 +636,7 @@ class Plab:
# Add new nodes
toadd = [] # List of IP's
for ip in avail:
if not known.has_key(ip):
if not known.has_key(ip) and ip not in toadd:
if len(ALLOWED_NODES) and not ip in ALLOWED_NODES:
if verbose:
print "Skipping %s because it's not in the allowed" \
......@@ -1024,7 +1025,7 @@ class Slice:
if not len(res):
raise RuntimeError, "Didn't get any results while looking for idx"
eindex = res[0][0]
self.slicename = "emulab_%s" % eindex
self.slicename = "%s_%s" % (SLICEPREFIX, eindex)
print "Creating Plab slice %s." % self.slicename
self.privkey, self.pubkey = self.__genKeypair()
try:
......
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