commit a4bbf01f4584b7fb3856967a6eae1edf46b10b82 Author: Ondrej Lichtner olichtne@redhat.com Date: Mon Apr 14 15:26:33 2014 +0200
NetConfigDevice: ignore address deletion fail
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@redhat.com Signed-off-by: Jiri Pirko jiri@resnulli.us
lnst/Slave/NetConfigDevice.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) --- 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
lnst-developers@lists.fedorahosted.org