mirror of https://github.com/apache/cloudstack.git
Bug fix: ignore ifaces that have no ip addresses in cloud-setup-databases
This commit is contained in:
parent
216e5f23d3
commit
8cdf0aeeec
|
|
@ -171,7 +171,8 @@ def ifaces():
|
|||
|
||||
def ip(iface):
|
||||
status,lines = commands.getstatusoutput('LANG=C /sbin/ip address show %s'%iface)
|
||||
assert status == 0
|
||||
if status != 0: return False
|
||||
#used to say: assert status == 0 but it caused a bug in ifaces without IP
|
||||
lines = [ l for l in lines.splitlines() if l.startswith(' inet ') ]
|
||||
if not lines: return None
|
||||
toks = lines[0].split()
|
||||
|
|
|
|||
Loading…
Reference in New Issue