From: S.Çağlar Onur Date: Fri, 8 Apr 2011 22:49:40 +0000 (-0400) Subject: Revert "handle one hostname <--> multiple ip" X-Git-Tag: bootmanager-5.0-18~4^2 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c3b764d84b79838fbca305a1e0067243e118c361;p=bootmanager.git Revert "handle one hostname <--> multiple ip" This reverts commit 1a55aa095e9e5ca2033626ef66b5925f408773f3. --- diff --git a/source/steps/ReadNodeConfiguration.py b/source/steps/ReadNodeConfiguration.py index 55684ba..5214612 100644 --- 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: - resolved_node_ip_list = socket.gethostbyname_ex(hostname)[2] + resolved_node_ip= socket.gethostbyname(hostname) except socket.gaierror, e: - hostname_resolve_ok = 0 + hostname_resolve_ok= 0 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: - 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: - 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" % \ - (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" %