Change in vdsm[master]: network: inherit DUID from a bridge's port with no restriction

danken at redhat.com danken at redhat.com
Mon Mar 28 16:52:40 UTC 2016


Dan Kenigsberg has submitted this change and it was merged.

Change subject: network: inherit DUID from a bridge's port with no restriction
......................................................................


network: inherit DUID from a bridge's port with no restriction

A bridge must reuse the DHCP unique identifier of the underlying
network device it is built atop so DHCP client obtains the same
lease (in particular, the same address).

Recently, the flow in setupNetworks changed in a way that the device
being "replaced" by the bridge no longer reports 'dhcpv4' as True.
There is simply no evidence of DHCPv4 being used on the device, and
thus DUID would not be inherited, as the checking is too strict.

Now, dhclient run on the bridge is always called with the '-df' option
(used to refer to the bridge port's lease file) as long as it is
supported. The option is harmless: dhclient simply ignores it if the
lease file doesn't exist.

As dhclient doesn't have a -h/--help option, we pass to it an
intentionally invalid option, tricking it into listing the options it
supports. To avoid printing the error output to logs, dhclient is now
called directly, not through execCmd.

Change-Id: Id86f3afc20562ca670370b2e2907d46ae2203900
Signed-off-by: Ondřej Svoboda <osvoboda at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/54130
Continuous-Integration: Jenkins CI
Reviewed-by: Edward Haas <edwardh at redhat.com>
Tested-by: Edward Haas <edwardh at redhat.com>
Tested-by: Paul Maidment <paulmaidmentuk at googlemail.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M lib/vdsm/network/configurators/dhclient.py
M lib/vdsm/network/configurators/ifcfg.py
M lib/vdsm/network/legacy_switch.py
3 files changed, 22 insertions(+), 36 deletions(-)

Approvals:
  Ondřej Svoboda: Verified
  Jenkins CI: Passed CI tests
  Dan Kenigsberg: Looks good to me, approved
  Paul Maidment: Verified
  Edward Haas: Verified; Looks good to me, but someone else must approve



-- 
To view, visit https://gerrit.ovirt.org/54130
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id86f3afc20562ca670370b2e2907d46ae2203900
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Paul Maidment <paulmaidmentuk at googlemail.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the vdsm-patches mailing list