From aa43aef98753b661e8530d05ebf145045411504b Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 27 Jan 2010 18:44:46 +0000 Subject: [PATCH] fixed and moved the server-side yum scripts, from nodeconfig/yum to BootstrapFS/nodeconfig/yum 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 | 5 ----- sliver_vs.py | 13 ++++--------- tools.py | 12 ------------ 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/conf_files.py b/conf_files.py index 8c47f95..1e5d960 100644 --- a/conf_files.py +++ b/conf_files.py @@ -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) diff --git a/sliver_vs.py b/sliver_vs.py index 6361037..8723e8c 100644 --- a/sliver_vs.py +++ b/sliver_vs.py @@ -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: diff --git a/tools.py b/tools.py index 94ba2d1..7505bd1 100644 --- 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 -- 2.43.0