commit a60917f7e7882dbf881def982f5222d7ffed698f
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Mon Nov 3 14:29:34 2014 +0100
InterfaceManager: is_name_used searches tmp_mapping
This should solve race conditions that occur when creating interfaces of
the same kind when the name of the first one is not yet recognized by
LNST as used.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
Signed-off-by: Jiri Pirko <jiri(a)resnulli.us>
lnst/Slave/InterfaceManager.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/lnst/Slave/InterfaceManager.py b/lnst/Slave/InterfaceManager.py
index 489c697..a557322 100644
--- a/lnst/Slave/InterfaceManager.py
+++ b/lnst/Slave/InterfaceManager.py
@@ -194,6 +194,9 @@ class InterfaceManager(object):
for device in self._devices.itervalues():
if name == device.get_name():
return True
+ for device in self._tmp_mapping.itervalues():
+ if name == device.get_name():
+ return True
return False
def _assign_name_generic(self, prefix):