X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=source%2Fsteps%2FReadNodeConfiguration.py;h=9c9f0df802ba4a0dc40e74b7349a43ac71ee7f45;hb=a0643cc47866e7fc3590909475ce8f79b8344597;hp=370f5c53c7bc2f0aee7a3dfc33746ccfa5c3e48d;hpb=094a91004df52c1db9cbdd65abe8bff6dbccd99c;p=bootmanager.git diff --git a/source/steps/ReadNodeConfiguration.py b/source/steps/ReadNodeConfiguration.py index 370f5c5..9c9f0df 100644 --- a/source/steps/ReadNodeConfiguration.py +++ b/source/steps/ReadNodeConfiguration.py @@ -17,7 +17,7 @@ from Exceptions import * import BootServerRequest import BootAPI import notify_messages -import UpdateBootStateWithPLC +import UpdateRunLevelWithPLC # two possible names of the configuration files @@ -473,7 +473,7 @@ def __parse_configuration_file( vars, log, file_contents ): log.write( "Configuration file does not contain the node_id value.\n" ) log.write( "Querying PLC for node_id.\n" ) - bs_request= BootServerRequest.BootServerRequest() + bs_request= BootServerRequest.BootServerRequest(vars) postVars= {"mac_addr" : INTERFACE_SETTINGS["mac"]} result= bs_request.DownloadFile( "%s/getnodeid.php" % @@ -599,18 +599,19 @@ def __parse_configuration_file( vars, log, file_contents ): vars["INTERFACE_SETTINGS"]= INTERFACE_SETTINGS - if not hostname_resolve_ok and not vars['DISCONNECTED_OPERATION']: + if (not hostname_resolve_ok and not vars['DISCONNECTED_OPERATION'] and + 'NAT_MODE' not in vars): log.write( "Hostname does not resolve correctly, will not continue.\n" ) if can_make_api_call: log.write( "Notifying contacts of problem.\n" ) - vars['BOOT_STATE']= 'failboot' + vars['RUN_LEVEL']= 'failboot' vars['STATE_CHANGE_NOTIFY']= 1 vars['STATE_CHANGE_NOTIFY_MESSAGE']= \ notify_messages.MSG_HOSTNAME_NOT_RESOLVE - UpdateBootStateWithPLC.Run( vars, log ) + UpdateRunLevelWithPLC.Run( vars, log ) log.write( "\n\n" ) log.write( "The hostname and/or ip in the network configuration\n" )