From: Ondrej Lichtner <olichtne(a)redhat.com>
The slave would crash on trying to remove an ip address that doesn't
exist on the device. This can happen for a variety of reasons, for
example the user removes the address in one of the tasks. This patch
fixes the crash.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Slave/NetConfigDevice.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py
index 39267a6..4fa1b50 100644
--- a/lnst/Slave/NetConfigDevice.py
+++ b/lnst/Slave/NetConfigDevice.py
@@ -61,7 +61,8 @@ class NetConfigDeviceGeneric(object):
config = self._dev_config
if "addresses" in config:
for address in config["addresses"]:
- exec_cmd("ip addr del %s dev %s" % (address,
config["name"]))
+ exec_cmd("ip addr del %s dev %s" % (address,
config["name"]),
+ die_on_err=False)
exec_cmd("ip link set %s down" % config["name"])
@classmethod
--
1.9.0