Petr Horáček has uploaded a new change for review.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
net: edit nic detached from bridge but still attached to a vlan
Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0e Signed-off-by: Petr Horáček phoracek@redhat.com Bug-Url: https://bugzilla.redhat.com/1372798 --- M lib/vdsm/network/configurators/ifcfg.py 1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/31/65231/1
diff --git a/lib/vdsm/network/configurators/ifcfg.py b/lib/vdsm/network/configurators/ifcfg.py index aac39d1..427d150 100644 --- a/lib/vdsm/network/configurators/ifcfg.py +++ b/lib/vdsm/network/configurators/ifcfg.py @@ -283,6 +283,11 @@ if set_mtu is not None: ipwrapper.linkSet(nic.name, ['mtu', str(set_mtu)])
+ # If the nic was bridged, we must remove BRIDGE parameter from its + # ifcfg configuration file. + if nic.bridge: + self.configApplier.dropBridgeParameter(nic.name) + def _getFilePath(self, fileType, device): return os.path.join(NET_CONF_DIR, '%s-%s' % (fileType, device))
gerrit-hooks has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 1:
* #1372798::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1372798::OK, public bug * Check Product::IGNORE, not relevant for branch: master * Check TM::SKIP, not in a monitored branch (ovirt-3.6 ovirt-4.0) * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
Dan Kenigsberg has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 1: Code-Review+2
Edward Haas has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 1: Code-Review-1
Can we please add a supporting test for this scenario? When verifying, it should fail without the fix and then pass with this fix.
Dan Kenigsberg has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 1: -Code-Review
Petr Horáček has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 1:
I tried to, but it does not fail with dummy (only with system NIC), I don't know why, i tried to precreate ifcfg config for the dummy but it did not help.
gerrit-hooks has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 2:
* Update Tracker::#1372798::IGNORE, not relevant for Red Hat classification * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::#1372798::OK, public bug * Check Product::IGNORE, not relevant for branch: master * Check TM::IGNORE, not relevant for branch: master * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
Petr Horáček has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 2: Verified-1
(1 comment)
https://gerrit.ovirt.org/#/c/65231/2/tests/network/func_net_basic_test.py File tests/network/func_net_basic_test.py:
Line 38: class NetworkBasicTemplate(NetFuncTestCase): Line 39: __test__ = False Line 40: Line 41: @contextmanager Line 42: def _test_detach_used_nic_from_bridge(self): test always passes (even without the fix) on dummies, it fails when nic is system nic (eth1) Line 43: with dummy_device() as nic: Line 44: NETCREATE = { Line 45: NETWORK1_NAME: {'nic': nic, 'switch': self.switch}, Line 46: NETWORK2_NAME: {'nic': nic, 'vlan': VLAN2,
gerrit-hooks has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 3:
* Update Tracker::#1372798::IGNORE, not relevant for Red Hat classification * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::#1372798::OK, public bug * Check Product::IGNORE, not relevant for branch: master * Check TM::IGNORE, not relevant for branch: master * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
gerrit-hooks has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 4:
* Update Tracker::#1372798::IGNORE, not relevant for Red Hat classification * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::#1372798::OK, public bug * Check Product::IGNORE, not relevant for branch: master * Check TM::IGNORE, not relevant for branch: master * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
Petr Horáček has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 4: Verified+1
Manually tested with physical nic. Passed network/*_test.py and functional/networkTests.py
Edward Haas has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 2:
(1 comment)
https://gerrit.ovirt.org/#/c/65231/2/tests/network/func_net_basic_test.py File tests/network/func_net_basic_test.py:
Line 38: class NetworkBasicTemplate(NetFuncTestCase): Line 39: __test__ = False Line 40: Line 41: @contextmanager Line 42: def _test_detach_used_nic_from_bridge(self):
test always passes (even without the fix) on dummies, it fails when nic is
Can you use a veth then? You may need to connect one side to a bride, in case you need it with link-up. Line 43: with dummy_device() as nic: Line 44: NETCREATE = { Line 45: NETWORK1_NAME: {'nic': nic, 'switch': self.switch}, Line 46: NETWORK2_NAME: {'nic': nic, 'vlan': VLAN2,
Dan Kenigsberg has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 4:
Could you at least check the ifcfg for BRIDGE, or explain why even this test is unattainable?
Petr Horáček has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 4:
I cannot check the ifcfg for BRIDGE, it works OK when I use dummies, have no idea why is there a difference with physical NIC. The difference is there even outside tests, reproduced via vdscli.
gerrit-hooks has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 5:
* Update Tracker::#1372798::IGNORE, not relevant for Red Hat classification * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::#1372798::OK, public bug * Check Product::IGNORE, not relevant for branch: master * Check TM::IGNORE, not relevant for branch: master * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
Dan Kenigsberg has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 5: Code-Review+2
Edy, I think we've spent too much time on trying to test this minor fix. I suggest to take it in as it is.
gerrit-hooks has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 6:
* Update Tracker::#1372798::IGNORE, not relevant for Red Hat classification * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::#1372798::OK, public bug * Check Product::IGNORE, not relevant for branch: master * Check TM::IGNORE, not relevant for branch: master * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0'])
Dan Kenigsberg has submitted this change and it was merged.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
net: edit nic detached from bridge but still attached to a vlan
We do not understand why, but the problem does not reproduce with dummy devices. Therefore, we cannot easily test it. Trying to reproduce the issue with a veth pair was deemed to much of a hassle. We test this fix manually and do not include a regression test for it.
Change-Id: I460cb08cf436b932e7d9592557a03d7b6fc36a0e Signed-off-by: Petr Horáček phoracek@redhat.com Bug-Url: https://bugzilla.redhat.com/1372798 Reviewed-on: https://gerrit.ovirt.org/65231 Reviewed-by: Dan Kenigsberg danken@redhat.com Continuous-Integration: Jenkins CI --- M lib/vdsm/network/configurators/ifcfg.py 1 file changed, 5 insertions(+), 0 deletions(-)
Approvals: Jenkins CI: Passed CI tests Petr Horáček: Verified Dan Kenigsberg: Looks good to me, approved
Objections: Edward Haas: I would prefer that you didn't submit this
gerrit-hooks has posted comments on this change.
Change subject: net: edit nic detached from bridge but still attached to a vlan ......................................................................
Patch Set 7:
* Update Tracker::#1372798::IGNORE, not relevant for Red Hat classification * Set MODIFIED::bug 1372798::::#1372798::::IGNORE, not all related patches are closed, check 65219
vdsm-patches@lists.fedorahosted.org