- User Since
- Feb 19 2020, 2:47 PM (116 w, 6 d)
May 7 2021
Note that adding autosudo=False to the call to cmd does not fix this issue because this parameter is never passed to popen: https://github.com/vyos/vyos-1x/blob/current/python/vyos/util.py#L143
Mar 3 2020
thanks for the quick fix!
Mar 2 2020
Thanks! As an additional note from my testing: the check for DHCP settings in the config always returns false, even if the interface uses DHCP. This could easily be fixed by checking if the values of the node contain DHCP, but if we skip this interface it won't be brought back up, so I believe the current solution is the best, even though the DHCP check line is now redundant (I noticed you removed the check itself).
Feb 24 2020
FWIW, this issue is still occuring on 1.3 rolling (1.3-rolling-202002180217) for interfaces with DHCP set. While the above referenced repository is archived, the script here https://github.com/vyos/vyos-vmwaretools-scripts/blob/current/scripts/resume-vm-default.d/ether-resume.py seems to be the latest version.
For any interface with DHCP enabled, it will try to run
ip address add dhcp dev ethX
Since dhcp is not a valid address this fails and after the interface loses it's IP until dhclient is run manually or the system reboots. The script linked by @dmaasland works correctly.