git://git.onelab.eu
/
bootmanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1a55aa0
)
Revert "handle one hostname <--> multiple ip"
author
S.Çağlar Onur
<caglar@verivue.com>
Fri, 8 Apr 2011 22:49:40 +0000
(18:49 -0400)
committer
S.Çağlar Onur
<caglar@verivue.com>
Fri, 8 Apr 2011 22:49:40 +0000
(18:49 -0400)
This reverts commit
1a55aa095e9e5ca2033626ef66b5925f408773f3
.
source/steps/ReadNodeConfiguration.py
patch
|
blob
|
history
diff --git
a/source/steps/ReadNodeConfiguration.py
b/source/steps/ReadNodeConfiguration.py
index
55684ba
..
5214612
100644
(file)
--- a/
source/steps/ReadNodeConfiguration.py
+++ b/
source/steps/ReadNodeConfiguration.py
@@
-558,25
+558,25
@@
def __parse_configuration_file( vars, log, file_contents ):
# try a regular dns lookup first
try:
# try a regular dns lookup first
try:
- resolved_node_ip
_list = socket.gethostbyname_ex(hostname)[2]
+ resolved_node_ip
= socket.gethostbyname(hostname)
except socket.gaierror, e:
except socket.gaierror, e:
- hostname_resolve_ok
= 0
+ hostname_resolve_ok= 0
if INTERFACE_SETTINGS['method'] == "dhcp":
if hostname_resolve_ok:
if INTERFACE_SETTINGS['method'] == "dhcp":
if hostname_resolve_ok:
- INTERFACE_SETTINGS['ip']= resolved_node_ip
_list[0]
- node_ip
= resolved_node_ip_list[0]
+ INTERFACE_SETTINGS['ip']= resolved_node_ip
+ node_ip
= resolved_node_ip
else:
can_make_api_call= 0
else:
else:
can_make_api_call= 0
else:
- node_ip
= INTERFACE_SETTINGS['ip']
+ node_ip= INTERFACE_SETTINGS['ip']
# make sure the dns lookup matches what the configuration file says
if hostname_resolve_ok:
# make sure the dns lookup matches what the configuration file says
if hostname_resolve_ok:
- if node_ip
not in resolved_node_ip_list
:
+ if node_ip
!= resolved_node_ip
:
log.write( "Hostname %s does not resolve to %s, but %s:\n" % \
log.write( "Hostname %s does not resolve to %s, but %s:\n" % \
- (hostname,node_ip,resolved_node_ip
_list
) )
+ (hostname,node_ip,resolved_node_ip) )
hostname_resolve_ok= 0
else:
log.write( "Hostname %s correctly resolves to %s:\n" %
hostname_resolve_ok= 0
else:
log.write( "Hostname %s correctly resolves to %s:\n" %