From 9ea45582b54387f99253307894e59ec5c6ddb176 Mon Sep 17 00:00:00 2001 From: Andy Bavier Date: Mon, 19 Oct 2009 20:26:45 +0000 Subject: [PATCH] Work around race condition when NodeManager is starting the vserver --- topo.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/topo.py b/topo.py index be68831..b2beba5 100755 --- a/topo.py +++ b/topo.py @@ -405,11 +405,12 @@ def GetSlivers(data, config = None, plc = None): slicekeys[sliver['name']] = tag['value'] - if 'netns' in attrs: - netns = int(attrs['netns']) - else: - netns = 0 - write_conf_and_restart(sliver['name'], netns) + if vserver.VServer(sliver['name']).is_running(): + if 'netns' in attrs: + netns = int(attrs['netns']) + else: + netns = 0 + write_conf_and_restart(sliver['name'], netns) if vserver.VServer(sliver['name']).is_running(): if 'egre_key' in attrs: -- 2.43.0