Igor Lvovsky has uploaded a new change for review. Change subject: Update MTU when removing one of networks with custom MTU from NIC/bond ......................................................................
Update MTU when removing one of networks with custom MTU from NIC/bond Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=853968 Change-Id: I7b91127c170b94871b1ae717f3d51f5fa86c7ac3 Signed-off-by: Igor Lvovsky <[email protected]> --- M vdsm/configNetwork.py 1 file changed, 7 insertions(+), 11 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/49/7749/1 diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py index 74d19c7..3c00f64 100755 --- a/vdsm/configNetwork.py +++ b/vdsm/configNetwork.py @@ -1034,12 +1034,11 @@ if network and bridged: configWriter.removeBridge(network) - name = None + iface = bonding if bonding else nics[0] if vlan: - configWriter.removeVlan(vlan, bonding or nics[0]) + configWriter.removeVlan(vlan, iface) else: - name = bonding if bonding else nics[0] - cf = configWriter.NET_CONF_PREF + name + cf = configWriter.NET_CONF_PREF + iface if not bridged: # When removing bridgeless non-VLANed network # we need to remove IP/NETMASK from the cfg file @@ -1050,24 +1049,21 @@ # we need to remove BRIDGE from the cfg file configWriter._updateConfigValue(cf, 'BRIDGE', '', True) + # Now we can restart changed interface + ifdown(iface) + ifup(iface) + # The (relatively) new setupNetwork verb allows to remove a network # defined on top of an bonding device without break the bond itself. if implicitBonding: if bonding and not bondingOtherUsers(network, vlan, bonding): ifdown(bonding) configWriter.removeBonding(bonding) - name = None if bonding == name else name for nic in nics: if not nicOtherUsers(network, vlan, bonding, nic): ifdown(nic) configWriter.removeNic(nic) - name = None if nic == name else name - - # Now we can restart changed interface - if name: - ifdown(name) - ifup(name) def clientSeen(timeout): start = time.time() -- To view, visit http://gerrit.ovirt.org/7749 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b91127c170b94871b1ae717f3d51f5fa86c7ac3 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Igor Lvovsky <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
