Page MenuHomeVyOS Platform

Remove running dhclient from ether-resume.py
Closed, ResolvedPublicBUG

Description

After diving into suspending and resuming VyOS with VMware recently I found that the dhclient it runs via ether-resume.py is redundant as the netplug service already handles renewing dhcp on link changes quite well.
The netplug script does this much better than just plain dhclient <interface> as it specifies the correct flags to retain the existing dhcp lease.

I propose to remove the dhcp + dhclient part in ether-resume.py completely and let this automatically be handled by the netplug script /etc/netplug/linkup.d/dhclient (which is still Perl btw).

This would prevent dhclient from being run multiple times as well when the VM resumes.
Also ether-resume.py currently does not handle dhcpv6 addresses in the script.

Let me know if the proposed change sounds good and I will send a PR.

Details

Version
VyOS-1.3.0-rc5
Is it a breaking change?
Behavior change
Issue type
Bug (incorrect behavior)

Event Timeline

It's funny, I remember that dhcp was already removed from ether-resume.py. I checked the git history, and it was.
Related issue and discussion about netplug vs ether-resume dhclient (buried deep in the beginning) https://phabricator.vyos.net/T1028

Commit where dhcp was already excluded from ether-resume.py:

commit 7e00ffa416853720549e9cd147bfcb0b938b004a
Author: Christian Poessinger <christian@poessinger.com>
Date: Sat Jan 25 08:47:26 2020 +0100

Debian: add vyos-1x-vmware package

Split out files required only by VMware systems.

Commit where it suddenly reappeared again:

commit 8dbd849e47e32ebabb382bc3287376e7df35dc09
Author: Christian Poessinger <christian@poessinger.com>
Date: Sun Mar 1 19:06:41 2020 +0100

vmware: T1028: readd static IP address after resume

I don't know why it was re-added, the commit message says static ip addresses and nothing about dhcp addresses.
In this comment it was already decided that it was best to go the netplug way: https://phabricator.vyos.net/T1028#28228

Viacheslav changed the task status from Open to Needs testing.Jul 21 2021, 6:54 PM
Viacheslav assigned this task to yun.

Confirmed fixed, static address is correctly assigned after resume. Tested with vyos-1.3-beta-202108192027-amd64.iso

SrividyaA set Issue type to Bug (incorrect behavior).Sep 1 2021, 10:35 AM