sometimes the ifconfig doesnt return the ovs interface, wait and try till we get the info

parent 9f14eb7c
......@@ -64,6 +64,13 @@ def computeOFlowInstall(dic, start_response):
p = Popen(ifcmd, shell=True, stdout=PIPE, stderr=PIPE)
out, err = p.communicate()
TAPNAME=out.rstrip()
while len(TAPNAME) < 3:
sleep(5)
p = Popen(ifcmd, shell=True, stdout=PIPE, stderr=PIPE)
out, err = p.communicate()
TAPNAME=out.rstrip()
LOG.info("TAPNAME: %s", TAPNAME)
OVSPORTNAME='qvo%s' % TAPNAME[3:]
LOG.info("OVSPORTNAME: %s", OVSPORTNAME)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment