Edward Haas has uploaded a new change for review.

Change subject: net: ifcfg - dhclient should always be stopped
......................................................................

net: ifcfg - dhclient should always be stopped

While running functional tests, it has been observed that dhclients are
still running on slave ifaces.

This patch is stopping any running dhclient per the configured iface.

Change-Id: Ib60930670b335d02e3878743409fd2e5f4b3e26b
Signed-off-by: Edward Haas <edwa...@redhat.com>
---
M lib/vdsm/network/configurators/ifcfg.py
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/32/62832/1

diff --git a/lib/vdsm/network/configurators/ifcfg.py 
b/lib/vdsm/network/configurators/ifcfg.py
index 111e194..64fe623 100644
--- a/lib/vdsm/network/configurators/ifcfg.py
+++ b/lib/vdsm/network/configurators/ifcfg.py
@@ -532,11 +532,12 @@
             cfg += 'BOOTPROTO=none\n'
         elif ipv4.bootproto:
             cfg += 'BOOTPROTO=%s\n' % pipes.quote(ipv4.bootproto)
-            if (ipv4.bootproto == 'dhcp' and
-                    os.path.exists(os.path.join(NET_PATH, name))):
-                # Ask dhclient to stop any dhclient running for the device
-                dhclient.kill(name)
-                address.flush(name, family=4)
+
+        if os.path.exists(os.path.join(NET_PATH, name)):
+            # Ask dhclient to stop any dhclient running for the device
+            dhclient.kill(name)
+            address.flush(name, family=4)
+
         if mtu:
             cfg += 'MTU=%d\n' % mtu
         if ipv4.defaultRoute is not None:


-- 
To view, visit https://gerrit.ovirt.org/62832
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib60930670b335d02e3878743409fd2e5f4b3e26b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <edwa...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org

Reply via email to