Petr Horáček has uploaded a new change for review. Change subject: net ifcfg: fix bond rollback ......................................................................
net ifcfg: fix bond rollback When setupNetworks(NET, BOND) fails on NET configuration, BOND ifcfg file is removed, but it still exists in the system. We have to remove it manually like we do in removeBonding(). Change-Id: I5cea6ec71c913d74d95317ff7318259d64b40969 Signed-off-by: Petr Horáček <[email protected]> --- M lib/vdsm/network/configurators/ifcfg.py 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/40/59940/1 diff --git a/lib/vdsm/network/configurators/ifcfg.py b/lib/vdsm/network/configurators/ifcfg.py index a3b18de..b8af836 100644 --- a/lib/vdsm/network/configurators/ifcfg.py +++ b/lib/vdsm/network/configurators/ifcfg.py @@ -712,6 +712,12 @@ if os.path.exists('/sys/class/net/%s/bridge' % dev): # ifdown is not enough to remove nicless bridges commands.execCmd([constants.EXT_BRCTL, 'delbr', dev]) + if dev.startswith('bond') and '.' not in dev: + with open(netinfo_bonding.BONDING_MASTERS) as info: + names = info.read().split() + if dev in names: + with open(netinfo_bonding.BONDING_MASTERS, 'w') as f: + f.write("-%s\n" % dev) def start_devices(device_ifcfgs): -- To view, visit https://gerrit.ovirt.org/59940 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5cea6ec71c913d74d95317ff7318259d64b40969 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Petr Horáček <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/admin/lists/[email protected]
