git://git.onelab.eu
/
bootmanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rework NAT support.
[bootmanager.git]
/
source
/
steps
/
ReadNodeConfiguration.py
diff --git
a/source/steps/ReadNodeConfiguration.py
b/source/steps/ReadNodeConfiguration.py
index
370f5c5
..
9c9f0df
100644
(file)
--- 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 BootServerRequest
import BootAPI
import notify_messages
-import Update
BootState
WithPLC
+import Update
RunLevel
WithPLC
# two possible names of the configuration files
# 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" )
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" %
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
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" )
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
vars['STATE_CHANGE_NOTIFY']= 1
vars['STATE_CHANGE_NOTIFY_MESSAGE']= \
notify_messages.MSG_HOSTNAME_NOT_RESOLVE
- Update
BootState
WithPLC.Run( vars, log )
+ Update
RunLevel
WithPLC.Run( vars, log )
log.write( "\n\n" )
log.write( "The hostname and/or ip in the network configuration\n" )
log.write( "\n\n" )
log.write( "The hostname and/or ip in the network configuration\n" )