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 <osvob...@redhat.com> Reviewed-on: https://gerrit.ovirt.org/54130 Continuous-Integration: Jenkins CI Reviewed-by: Edward Haas <edwa...@redhat.com> Tested-by: Edward Haas <edwa...@redhat.com> Tested-by: Paul Maidment <paulmaidmen...@googlemail.com> Reviewed-by: Dan Kenigsberg <dan...@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 <osvob...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Edward Haas <edwa...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Ondřej Svoboda <osvob...@redhat.com> Gerrit-Reviewer: Paul Maidment <paulmaidmen...@googlemail.com> Gerrit-Reviewer: Petr Horáček <phora...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches