From 80a8fdde181b28da43faa152732e0086ffbf2656 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Sun, 4 Feb 2007 01:30:00 +0000 Subject: [PATCH] - look for PlanetLab-Bootstrap-.tar.bz2 in the boot/ directory, to support rinses by nodegroup (>=4.0 only, which supports calling GetNodes() and GetNodeGroups() via BootAPI) --- source/steps/InstallBootstrapRPM.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/source/steps/InstallBootstrapRPM.py b/source/steps/InstallBootstrapRPM.py index 5937f4d..c732119 100644 --- a/source/steps/InstallBootstrapRPM.py +++ b/source/steps/InstallBootstrapRPM.py @@ -14,6 +14,7 @@ import shutil from Exceptions import * import utils import BootServerRequest +import BootAPI def Run( vars, log ): @@ -88,13 +89,23 @@ def Run( vars, log ): SYSIMG_PATH), log ) vars['ROOT_MOUNTED']= 1 - + + # check which nodegroups we are part of (>=4.0) + tarballs = [] + try: + nodes = BootAPI.call_api_function(vars, "GetNodes", ([NODE_ID], ['nodegroup_ids'])) + node = nodes[0] + nodegroups = BootAPI.call_api_function(vars, "GetNodeGroups", (node['nodegroup_ids'], ['name'])) + for nodegroup in nodegroups: + tarballs.append("PlanetLab-Bootstrap-%s.tar.bz2" % nodegroup['name'].lower()) + except: + pass + tarballs += ["PlanetLab-Bootstrap.tar.bz2", "alpina-BootstrapRPM.tar.bz2"] # download and extract support tarball for # this step, which has everything # we need to successfully run - for step_support_file in [ "PlanetLab-Bootstrap.tar.bz2", - "alpina-BootstrapRPM.tar.bz2" ]: + for step_support_file in tarballs: source_file= "%s/%s" % (SUPPORT_FILE_DIR,step_support_file) dest_file= "%s/%s" % (SYSIMG_PATH, step_support_file) -- 2.43.0