Change in vdsm[master]: net: ovs: remove initial nic ip, dont touch unchanged networks
ibarkan at redhat.com
ibarkan at redhat.com
Mon Nov 23 05:17:55 UTC 2015
Ido Barkan has posted comments on this change.
Change subject: net: ovs: remove initial nic ip, dont touch unchanged networks
......................................................................
Patch Set 11:
(2 comments)
https://gerrit.ovirt.org/#/c/46692/11/vdsm_hooks/ovs/ovs_before_network_setup_ip.py
File vdsm_hooks/ovs/ovs_before_network_setup_ip.py:
Line 113: with suppress(ipwrapper.IPRoute2Error): # device does not exist
Line 114: ipwrapper.addrFlush(iface)
Line 115:
Line 116:
Line 117: def _drop_ip_config(iface):
> it drops ip configuration if passed iface, what's wrong with it? the 'drop'
it only kills dhclient. no ip configuratios is dropped. am i missing something?
Line 118: """Remove IP configuration of a new nic controlled by VDSM"""
Line 119: if os.path.exists(os.path.join('/sys/class/net', iface)):
Line 120: kill_dhclient(iface, family=4) # kill_dhclient flushes IP
Line 121: kill_dhclient(iface, family=6)
Line 133:
Line 134: ip_config_to_set = {}
Line 135: ip_config_to_remove = {}
Line 136:
Line 137: for net, attrs in nets.iteritems():
> nics which were not a part of the network before. for example if we attach
Ok. But what if it had a static ip configuration beforehand? killing dhclient should not be enough.
Line 138: if 'remove' in attrs: # if network was removed
Line 139: # remove network's IP configuration (running dhclient)
Line 140: ip_config = _gather_ip_config(init_nets[net])
Line 141: ip_config_to_remove[ip_config.top_dev] = ip_config
--
To view, visit https://gerrit.ovirt.org/46692
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie9682c75cfb79f75b64cb8cb587fc3ed01cf15c8
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list