bug 14498: in xenserver 6.0 and openvswitch enabled, reboot xenserver will lost link local bridge; the workaround is if the link local bridge is lost, create a new one; status 14498: resolved fixed; Reviewed-by: frank

This commit is contained in:
Edison Su 2012-03-26 17:13:35 -07:00
parent 68ce66ef78
commit 0ed1943d28
1 changed files with 17 additions and 1 deletions

View File

@ -274,7 +274,23 @@ def setLinkLocalIP(session, args):
cmd = ["ifconfig", brName, "169.254.0.1", "netmask", "255.255.0.0"]
txt = util.pread2(cmd)
except:
txt = ''
try:
cmd = ["brctl", "addbr", brName]
txt = util.pread2(cmd)
except:
pass
try:
cmd = ["ovs-vsctl", "add-br", brName]
txt = util.pread2(cmd)
except:
pass
try:
cmd = ["ifconfig", brName, "169.254.0.1", "netmask", "255.255.0.0"]
txt = util.pread2(cmd)
except:
pass
try:
cmd = ["ip", "route", "add", "169.254.0.0/16", "dev", brName, "src", "169.254.0.1"]
txt = util.pread2(cmd)