Change in vdsm[ovirt-3.6]: net: edit bond detached from bridge but still attached to a ...

2016-10-27 Thread danken
Dan Kenigsberg has submitted this change and it was merged.

Change subject: net: edit bond detached from bridge but still attached to a vlan
..


net: edit bond detached from bridge but still attached to a vlan

Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0f
Signed-off-by: Petr Horáček 
Bug-Url: https://bugzilla.redhat.com/1381880
Reviewed-on: https://gerrit.ovirt.org/63723
Reviewed-by: Edward Haas 
Continuous-Integration: Jenkins CI
Reviewed-by: Dan Kenigsberg 
Reviewed-on: https://gerrit.ovirt.org/65219
---
M vdsm/network/configurators/ifcfg.py
1 file changed, 22 insertions(+), 0 deletions(-)

Approvals:
  Jenkins CI: Passed CI tests
  Petr Horáček: Verified
  Dan Kenigsberg: Looks good to me, approved
  Edward Haas: Looks good to me, but someone else must approve



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0f
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Petr Horáček 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Edward Haas 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[ovirt-3.6]: net: edit bond detached from bridge but still attached to a ...

2016-10-27 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: net: edit bond detached from bridge but still attached to a vlan
..


Patch Set 4:

* update_tracker: OK
* Set MODIFIED::bug 1381880#1381880IGNORE, not all related patches are 
closed, check 65233

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0f
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Petr Horáček 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Edward Haas 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[ovirt-3.6]: net: edit bond detached from bridge but still attached to a ...

2016-10-27 Thread danken
Dan Kenigsberg has posted comments on this change.

Change subject: net: edit bond detached from bridge but still attached to a vlan
..


Patch Set 3: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0f
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Petr Horáček 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Edward Haas 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[ovirt-3.6]: net: edit bond detached from bridge but still attached to a ...

2016-10-26 Thread edwardh
Edward Haas has posted comments on this change.

Change subject: net: edit bond detached from bridge but still attached to a vlan
..


Patch Set 3: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0f
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Petr Horáček 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Edward Haas 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[ovirt-3.6]: net: edit bond detached from bridge but still attached to a ...

2016-10-07 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: net: edit bond detached from bridge but still attached to a vlan
..


Patch Set 3:

* #63723::Update tracker: OK
* #1381880::Update tracker: OK
* Check Bug-Url::OK
* Check Public Bug::#1381880::OK, public bug
* Check Product::#63723::IGNORE, not relevant for classification: Retired
* Check Product::#1381880::IGNORE, not relevant for classification: Red Hat
* Check TM::#1381880::OK, correct target milestone ovirt-3.6.11
* Check merged to previous::OK, change not open on any previous branch

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0f
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Petr Horáček 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[ovirt-3.6]: net: edit bond detached from bridge but still attached to a ...

2016-10-07 Thread phoracek
Petr Horáček has posted comments on this change.

Change subject: net: edit bond detached from bridge but still attached to a vlan
..


Patch Set 2: Verified+1

Passed functional/networkTests.py and manual testing (add untagged net, tagged 
net, both attached to a bond; change untagged to tagged; check if BRIDGE= was 
removed from bond ifcfg)

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0f
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Petr Horáček 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Petr Horáček 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[ovirt-3.6]: net: edit bond detached from bridge but still attached to a ...

2016-10-07 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: net: edit bond detached from bridge but still attached to a vlan
..


Patch Set 2:

* #1372798::Update tracker: OK
* #63723::Update tracker: OK
* Check Bug-Url::OK
* Check Public Bug::#1372798::OK, public bug
* Check Product::#1372798::IGNORE, not relevant for classification: Red Hat
* Check Product::#63723::IGNORE, not relevant for classification: Retired
* Check TM::#1372798::ERROR, wrong target milestone for stable branch, 
ovirt-4.0.5 should match ^.*3.6.*
* Check merged to previous::OK, change not open on any previous branch

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0f
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Petr Horáček 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[ovirt-3.6]: net: edit bond detached from bridge but still attached to a ...

2016-10-07 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: net: edit bond detached from bridge but still attached to a vlan
..


Patch Set 1:

* #1372798::Update tracker: OK
* #63723::Update tracker: OK
* Check Bug-Url::OK
* Check Public Bug::#1372798::OK, public bug
* Check Product::#1372798::IGNORE, not relevant for classification: Red Hat
* Check Product::#63723::IGNORE, not relevant for classification: Retired
* Check TM::#1372798::ERROR, wrong target milestone for stable branch, 
ovirt-4.0.5 should match ^.*3.6.*
* Check merged to previous::OK, change not open on any previous branch

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Petr Horáček 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[ovirt-3.6]: net: edit bond detached from bridge but still attached to a ...

2016-10-07 Thread phoracek
Hello Dan Kenigsberg,

I'd like you to do a code review.  Please visit

https://gerrit.ovirt.org/65219

to review the following change.

Change subject: net: edit bond detached from bridge but still attached to a vlan
..

net: edit bond detached from bridge but still attached to a vlan

Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0f
Signed-off-by: Petr Horáček 
Bug-Url: https://bugzilla.redhat.com/1372798
Reviewed-on: https://gerrit.ovirt.org/63723
Reviewed-by: Edward Haas 
Continuous-Integration: Jenkins CI
Reviewed-by: Dan Kenigsberg 
---
M vdsm/network/configurators/ifcfg.py
1 file changed, 26 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/19/65219/1

diff --git a/vdsm/network/configurators/ifcfg.py 
b/vdsm/network/configurators/ifcfg.py
index 4e7d4ab..fb58ca5 100644
--- a/vdsm/network/configurators/ifcfg.py
+++ b/vdsm/network/configurators/ifcfg.py
@@ -230,8 +230,15 @@
 if set_mtu is not None:
 ipwrapper.linkSet(bonding.name, ['mtu', str(set_mtu)])
 
-def removeNic(self, nic):
-to_be_removed = self._ifaceDownAndCleanup(nic)
+# If the bond was bridged, we must remove BRIDGE parameter from its
+# ifcfg configuration file.
+if bonding.bridge:
+self.configApplier.dropBridgeParameter(bonding.name)
+
+def removeNic(self, nic, remove_even_if_used=False):
+if not self.owned_device(nic.name):
+self.normalize_device_filename(nic.name)
+to_be_removed = self._ifaceDownAndCleanup(nic, remove_even_if_used)
 if to_be_removed:
 self.configApplier.removeNic(nic.name)
 if nic.name in netinfo.nics():
@@ -733,6 +740,23 @@
 for slave in slaves:
 self.setIfaceMtu(slave, newmtu)
 
+def dropBridgeParameter(self, iface_name):
+iface_conf_path = netinfo.NET_CONF_PREF + iface_name
+
+if not os.path.isfile(iface_conf_path):
+return
+
+with open(iface_conf_path) as f:
+config_lines = f.readlines()
+
+config_lines_without_comments_and_bridge = [
+line for line in config_lines
+if (not line.startswith('#') and
+not line.startswith('BRIDGE'))]
+
+self.writeConfFile(iface_conf_path,
+   ''.join(config_lines_without_comments_and_bridge))
+
 
 def stop_devices(device_ifcfgs):
 for dev in reversed(_sort_device_ifcfgs(device_ifcfgs)):


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Petr Horáček 
Gerrit-Reviewer: Dan Kenigsberg 
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org