Ido Barkan has uploaded a new change for review.
Change subject: net: Force blocking DHCP when restoring networks ......................................................................
net: Force blocking DHCP when restoring networks
This is done right before restoring the network configuration, and before calling setupNetworks. It forces the configurator to wait for an IP address to be configured on the devices before restoration is completed. This prevents VDSM from possibly report missing IP addresses on interfaces that had been restored right before it was started.
Change-Id: Ibc8b84a82794ac97eba6d34ec9d54430e387b659 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1218637 Signed-off-by: Ido Barkan ibarkan@redhat.com
Change-Id: Ib9eb07f7dc54d9167460ea9936d68b77b96564d6 Signed-off-by: Ido Barkan ibarkan@redhat.com --- M vdsm/vdsm-restore-net-config 1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/67/40567/1
diff --git a/vdsm/vdsm-restore-net-config b/vdsm/vdsm-restore-net-config index d7cb8c7..515a03a 100755 --- a/vdsm/vdsm-restore-net-config +++ b/vdsm/vdsm-restore-net-config @@ -73,11 +73,27 @@ persistentConfig = PersistentConfig() nets, bonds = _filter_nets_bonds(persistentConfig.networks, persistentConfig.bonds) + _convert_to_blocking_dhcp(nets) logging.debug('Calling setupNetworks with networks (%s) and bond (%s).', nets, bonds) setupNetworks(nets, bonds, connectivityCheck=False, _inRollback=True)
+def _convert_to_blocking_dhcp(networks): + """ + This function changes DHCP configuration, if present, to be blocking. + + This is done right before restoring the network configuration, and forces + the configurator to wait for an IP address to be configured on the devices + before restoration is completed. This prevents VDSM to possibly report + missing IP address on interfaces that had been restored right before it was + started. + """ + for net, net_attr in networks.iteritems(): + if net_attr.get('bootproto') == 'dhcp': + net_attr['blockingdhcp'] = True + + def _filter_nets_bonds(nets, bonds): """Returns only nets and bonds that can be configured with the devices present in the system"""
automation@ovirt.org has posted comments on this change.
Change subject: net: Force blocking DHCP when restoring networks ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::OK * Check Public Bug::#1218637::OK, public bug * Check Product::#1218637::OK, Correct product Red Hat Enterprise Virtualization Manager * Check TR::#1218637::OK, correct target release 3.5.4 * warn_if_not_merged_to_previous_branch: OK
Ido Barkan has abandoned this change.
Change subject: net: Force blocking DHCP when restoring networks ......................................................................
Abandoned
mistake
automation@ovirt.org has posted comments on this change.
Change subject: net: Force blocking DHCP when restoring networks ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found
vdsm-patches@lists.fedorahosted.org