Commit e7479d7c authored by Gary Wong's avatar Gary Wong

Try a bit harder to find node addresses (with old or buggy component

managers), and fail politely if we can't.
parent 77771c48
......@@ -137,7 +137,21 @@ for cm in response[ "value" ]:
params[ "uuid" ] = node
rval, response = do_method( None, "Resolve", params,
cm[ "url" ] )
Say( response[ "value" ][ "physctrl" ] )
if rval:
print >> sys.stderr, "Could not resolve node " + \
node
os._exit( 1 )
if "physctrl" in response[ "value" ]:
Say( response[ "value" ][ "physctrl" ] )
elif "interfaces" in response[ "value" ]:
for interface in response[ "value" ][ "interfaces" ]:
if interface[ "role" ] == "ctrl":
Say( interface[ "IP" ] )
break
else:
print >> sys.stderr, "No address available for " + \
node
os._exit( 1 )
else:
Say( NOTREADY )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment