[PRD-2394] proceed FuelMenu if DNS resolve fails
Change-Id: I7312ce5b1a00ff8a991d4b1905387361b870b12f
This commit is contained in:
parent
67de902326
commit
9886f35164
@ -24,7 +24,6 @@ def inSameSubnet(ip1, ip2, netmask_or_cidr):
|
||||
cidr2 = netaddr.IPNetwork("%s/%s" % (ip2, netmask_or_cidr))
|
||||
return cidr1 == cidr2
|
||||
except netaddr.AddrFormatError:
|
||||
log.warning(traceback.format_exc())
|
||||
return False
|
||||
|
||||
|
||||
@ -33,7 +32,6 @@ def getCidr(ip, netmask):
|
||||
ipn = netaddr.IPNetwork("%s/%s" % (ip, netmask))
|
||||
return str(ipn.cidr)
|
||||
except netaddr.AddrFormatError:
|
||||
log.warning(traceback.format_exc())
|
||||
return False
|
||||
|
||||
|
||||
@ -42,7 +40,6 @@ def getCidrSize(cidr):
|
||||
ipn = netaddr.IPNetwork(cidr)
|
||||
return ipn.size
|
||||
except netaddr.AddrFormatError:
|
||||
log.warning(traceback.format_exc())
|
||||
return False
|
||||
|
||||
|
||||
@ -62,5 +59,4 @@ def getNetwork(ip, netmask, additionalip=None):
|
||||
|
||||
return ipn_list
|
||||
except netaddr.AddrFormatError:
|
||||
log.warning(traceback.format_exc())
|
||||
return False
|
||||
|
@ -195,9 +195,18 @@ class dnsandhostname(urwid.WidgetWrap):
|
||||
|
||||
#Try to resolve with first address
|
||||
if not self.checkDNS(DNS_UPSTREAM):
|
||||
errors.append("IP %s unable to resolve DNS hostname.")
|
||||
#Warn user that DNS resolution failed, but continue
|
||||
msg = "Unable to resolve %s.\n\n" % responses['TEST_DNS']\
|
||||
+ "Possible causes for DNS failure include:\n"\
|
||||
+ "* Invalid DNS server\n"\
|
||||
+ "* Invalid gateway\n"\
|
||||
+ "* Other networking issue\n\n"\
|
||||
+ "Fuel Setup can save this configuration, but "\
|
||||
+ "you may want to correct your settings."
|
||||
diag = dialog.display_dialog(self, TextLabel(msg),
|
||||
"DNS Failure Warning")
|
||||
self.parent.refreshScreen()
|
||||
except Exception, e:
|
||||
errors.append(e)
|
||||
errors.append("Not a valid IP address for External DNS: %s"
|
||||
% responses["DNS_UPSTREAM"])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user