Page MenuHomeVyOS Platform

Remove running dhclient from ether-resume.py
Needs testing, Requires assessmentPublicBUG

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

Difficulty level
Easy (less than an hour)
Version
VyOS-1.3.0-rc5
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Behavior change

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.Wed, Jul 21, 6:54 PM
Viacheslav assigned this task to yun.