Igor Lvovsky has uploaded a new change for review. Change subject: configNetwork: use MTU as int in setNewMtu ......................................................................
configNetwork: use MTU as int in setNewMtu Change-Id: I3ab6c3c624c284a8ffed34f16836a1d3d75f8eea Signed-off-by: Igor Lvovsky <[email protected]> --- M vdsm/configNetwork.py 1 file changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/60/7360/1 diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py index ac4a131..f6669e9 100755 --- a/vdsm/configNetwork.py +++ b/vdsm/configNetwork.py @@ -583,7 +583,9 @@ _netinfo = netinfo.NetInfo() cf = self.NET_CONF_PREF + bridge currmtu = self._getConfigValue(cf, 'MTU') - if currmtu is None: + if currmtu: + currmtu = int(currmtu) + else: return nics, delvlan, bonding = _netinfo.getNicsVlanAndBondingForNetwork(bridge) @@ -604,19 +606,22 @@ continue cf = self.NET_CONF_PREF + iface + '.' + vlan mtu = self._getConfigValue(cf, 'MTU') + if mtu: + mtu = int(mtu) newmtu = max(newmtu, mtu) if newmtu != currmtu: if bonding: cf = self.NET_CONF_PREF + bonding - self._updateConfigValue(cf, 'MTU', newmtu, newmtu is None) + self._updateConfigValue(cf, 'MTU', str(newmtu), newmtu is None) slaves = netinfo.slaves(bonding) for slave in slaves: cf = self.NET_CONF_PREF + slave - self._updateConfigValue(cf, 'MTU', newmtu, newmtu is None) + self._updateConfigValue(cf, 'MTU', str(newmtu), + newmtu is None) else: cf = self.NET_CONF_PREF + nics[0] - self._updateConfigValue(cf, 'MTU', newmtu, newmtu is None) + self._updateConfigValue(cf, 'MTU', str(newmtu), newmtu is None) def isBridgeNameValid(bridgeName): return bridgeName and len(bridgeName) <= MAX_BRIDGE_NAME_LEN and \ -- To view, visit http://gerrit.ovirt.org/7360 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3ab6c3c624c284a8ffed34f16836a1d3d75f8eea 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
