Antoni Segura Puimedon has uploaded a new change for review.

Change subject: Fix bridgeless net regression
......................................................................

Fix bridgeless net regression

The commit:
Ie8bb5fd9fc6ad69cf120d62264d73490b65b82d7
http://gerrit.ovirt.org/#/c/11356/4/

That commit introduced a bug that prevents the user from configuring
a bridgeless network with dhcp. That is so because after the change,
if ipaddr is None, which is the most usual case when configuring a
network for dhcp, bootproto will be overriden by what was on the
original config file (quite probably None).

Change-Id: I2881791f7b2b23cdcea25b73d3eb44de2d2addc8
Signed-off-by: Antoni S. Puimedon <[email protected]>
---
M vdsm/netconf/ifcfg.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/86/16086/1

diff --git a/vdsm/netconf/ifcfg.py b/vdsm/netconf/ifcfg.py
index b04bb59..25f15f9 100644
--- a/vdsm/netconf/ifcfg.py
+++ b/vdsm/netconf/ifcfg.py
@@ -509,7 +509,7 @@
 
         if netinfo.NetInfo().ifaceUsers(bonding):
             confParams = netinfo.getIfaceCfg(bonding)
-            if not ipaddr:
+            if not ipaddr and bootproto != 'dhcp':
                 ipaddr = confParams.get('IPADDR', None)
                 netmask = confParams.get('NETMASK', None)
                 gateway = confParams.get('GATEWAY', None)
@@ -542,7 +542,7 @@
 
         if _netinfo.ifaceUsers(nic):
             confParams = netinfo.getIfaceCfg(nic)
-            if not ipaddr:
+            if not ipaddr and bootproto != 'dhcp':
                 ipaddr = confParams.get('IPADDR', None)
                 netmask = confParams.get('NETMASK', None)
                 gateway = confParams.get('GATEWAY', None)


-- 
To view, visit http://gerrit.ovirt.org/16086
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2881791f7b2b23cdcea25b73d3eb44de2d2addc8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to