fixed and moved the server-side yum scripts, from nodeconfig/yum to BootstrapFS/nodec...
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 27 Jan 2010 18:44:46 +0000 (18:44 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 27 Jan 2010 18:44:46 +0000 (18:44 +0000)
  now known as the nodeyum package
  (might need some moer work for properly handling kexcludes in multi-fc plcs)
cleaned up all uses of /etc/planetlab/{node,slice}family
nodeconfig now does not need the build/ module anymore at build time

conf_files.py
sliver_vs.py
tools.py

index 8c47f95..1e5d960 100644 (file)
@@ -57,11 +57,6 @@ class conf_files:
             url += "node_id=%d"%tools.node_id()
         else:
             logger.log('%s -- WARNING, cannot add node_id to request'%dest)
-        # pass slicefamily as well, as stored in /etc/planetlab/slicefamily on the node
-        if tools.slicefamily():
-            if url.find('?') >0: url += '&'
-            else:                url += '?'
-            url += "slicefamily=%s"%tools.slicefamily()
         try:
             logger.verbose("retrieving URL=%s"%url)
             contents = curlwrapper.retrieve(url, self.config.cacert)
index 6361037..8723e8c 100644 (file)
@@ -80,19 +80,14 @@ class Sliver_VS(accounts.Account, vserver.VServer):
         if vref is None:
             logger.log("creating %s : no vref attached, this is unexpected"%name)
             vref='default'
-        # used to look in /etc/planetlab/family, now relies on the 'family' extra attribute in GetSlivers()
+        # used to look in /etc/planetlab/family, 
+        # now relies on the 'GetSliceFamily' extra attribute in GetSlivers()
         # which for legacy is still exposed here as the 'vref' key
         
         # check the template exists -- there's probably a better way..
         if not os.path.isdir ("/vservers/.vref/%s"%vref):
-            # find a resonable default
-            if os.path.isfile ("/etc/planetlab/slicefamily"):
-                default=file("/etc/planetlab/slicefamily").read().strip()
-            else:
-                default='default'
-                logger.log("creating %s : /etc/planetlab/slicefamily not found, this is unexpected"%name)
-            logger.log("creating %s - vref %s not found, using default %s"%(name,vref,default))
-            vref=default
+            logger.log ("%s: ERROR Could not create sliver - vreference image %s not found"%(name,vref))
+            return
 
         # guess arch
         try:
index 94ba2d1..7505bd1 100644 (file)
--- a/tools.py
+++ b/tools.py
@@ -128,18 +128,6 @@ def node_id():
             _node_id=""
     return _node_id
 
-# get slicefamily from /etc/planetlab/slicefamily and cache it
-# http://svn.planet-lab.org/wiki/SliceFamily
-_slicefamily=None
-def slicefamily():
-    global _slicefamily
-    if _slicefamily is None:
-        try:
-            _slicefamily=file("/etc/planetlab/slicefamily").read().strip()
-        except:
-            _slicefamily=""
-    return _slicefamily
-
 _root_context_arch=None
 def root_context_arch():
     global _root_context_arch