X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=source%2Fsteps%2FInstallUninitHardware.py;h=e513997045fcf14d48f8d400cfa4f370a9634081;hb=2151b25b18627ee01c6290d8440f8bcf662c286b;hp=7a2861232ff951b5916b14c3fae450cb9f9a8827;hpb=3d3501347eac5ca2db4bfd37d0af471984c56b48;p=bootmanager.git diff --git a/source/steps/InstallUninitHardware.py b/source/steps/InstallUninitHardware.py index 7a28612..e513997 100644 --- a/source/steps/InstallUninitHardware.py +++ b/source/steps/InstallUninitHardware.py @@ -50,7 +50,9 @@ import utils def Run( vars, log ): """ Unitializes hardware: - - unmount all previously mounted partitions + - unmount everything mounted during install, except the + /dev/planetlab/root and /dev/planetlab/vservers. This includes + calling swapoff for /dev/planetlab/swap. Except the following variables from the store: TEMP_PATH the path to download and store temp files to @@ -58,9 +60,6 @@ def Run( vars, log ): (always starts with TEMP_PATH) PARTITIONS dictionary of generic part. types (root/swap) and their associated devices. - NODE_ID the node_id from the database for this node - - this is needed to make any requests back to the server Sets the following variables: None @@ -83,10 +82,6 @@ def Run( vars, log ): if PARTITIONS == None: raise ValueError, "PARTITIONS" - NODE_ID= vars["NODE_ID"] - if NODE_ID == "": - raise ValueError("NODE_ID") - except KeyError, var: raise BootManagerException, "Missing variable in vars: %s\n" % var except ValueError, var: @@ -107,31 +102,10 @@ def Run( vars, log ): log.write( "Unmounting proc.\n" ) utils.sysexec( "umount %s/proc" % SYSIMG_PATH, log ) - log.write( "Unmounting vserver partition.\n" ) - utils.sysexec( "umount %s" % PARTITIONS["vservers"], log ) - log.write( "Unmounting rcfs file system in image.\n" ) utils.sysexec_noerr( "chroot %s umount /rcfs" % SYSIMG_PATH, log ) - log.write( "Unmounting system image.\n" ) - utils.sysexec( "umount %s" % PARTITIONS["root"], log ) - log.write( "Shutting down swap\n" ) utils.sysexec( "swapoff %s" % PARTITIONS["swap"], log ) - # as one of the last steps, upload /var/log/messages if it exists - - # send a notification that the install is complete - #action= "email" - #message= "installfinished" - #nodestate= "" - - #try: - # result= utils.notifybootserver( BS_REQUEST, NODE_ID, - # NODE_NONCE, - # action, message, nodestate ) - #except AlpinaError, desc: - # log.write( "Unable to notify boot server of " \ - # "install complete (not critical): %s" % desc ) - return 1