This is the fix for regression introduced by
commit 83e442284c047e5defc78686d89064b3b45b27f4 NetConfigDevice: don't set loopback device down
NetconfigDeviceGeneric.down() method does also address deconfiguration and the commit caused that loopback devices kept the configured addresses after cleanup. The solution is to override the down() method and do the address removal only.
Signed-off-by: Jan Tluka jtluka@redhat.com --- lnst/Slave/NetConfigDevice.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lnst/Slave/NetConfigDevice.py b/lnst/Slave/NetConfigDevice.py index 1422850..5de8c73 100644 --- a/lnst/Slave/NetConfigDevice.py +++ b/lnst/Slave/NetConfigDevice.py @@ -102,8 +102,12 @@ class NetConfigDeviceLoopback(NetConfigDeviceGeneric): # this might have an unpredictable impact on further testing. # In case of non-root namespace leaving loopback device up is not # a problem since the namespace will get destroyed after recipe is - # finished - pass + # finished. So, we will remove the configured addresses only + config = self._dev_config + if "addresses" in config: + for address in config["addresses"]: + exec_cmd("ip addr del %s dev %s" % (address, config["name"]), + die_on_err=False)
class NetConfigDeviceBond(NetConfigDeviceGeneric): _modulename = "bonding"
On Tue, Oct 27, 2015 at 05:04:52PM +0100, Jan Tluka wrote:
This is the fix for regression introduced by
commit 83e442284c047e5defc78686d89064b3b45b27f4 NetConfigDevice: don't set loopback device down
NetconfigDeviceGeneric.down() method does also address deconfiguration and the commit caused that loopback devices kept the configured addresses after cleanup. The solution is to override the down() method and do the address removal only.
Signed-off-by: Jan Tluka jtluka@redhat.com
Acked-by: Ondrej Lichtner olichtne@redhat.com
lnst-developers@lists.fedorahosted.org