DHCP bug re-introduced in rolling update

I am working with 1.4-rolling-202209130217 (Sagatta) and it looks like two issues that were corrected on 2022-02-01 (T4220 and T4224) are occurring again. I create an image from the ISO and set eth0 for DHCP (set interfaces ethernet address dhcp or adding iface eth0 inet dhcp to /etc/network/interfaces file). I reboot and execute “ip a” and the interface has no ip address. If I execute “sudo dhclient eth0” I immediately get an ip address. I’m assuming that since that command works (like it did in T4220), the same problem has been re-introduced.

I searched the changelog and didn’t see any additional updates for DHCP client issues. I’ll grab a newer version of the rolling releases to see if the issue still exists or has been reverted by someone else.

Please advise if this is what you are seeing as well.

I pulled down vyos-1.4-rolling-202212160319-amd64.iso, installed it and configured DHCP on eth0, and the same thing is occurring. Looks like the issue is continuing in the latest rolling releases.

Just adding set interfaces ethernet eth0 address dhcp and then rebooting, I’m not able to reproduce error:

[  OK  ] Reached target VyOS target.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Finished Update UTMP about System Runlevel Changes.
[   18.605934] vyos-router[741]: Mounting VyOS Config...done.
[   21.827822] vyos-router[741]: Starting VyOS router: migrate configure.
[   22.170412] vyos-config[750]: Configuration success

Welcome to VyOS - vyos ttyS0

vyos login: vyos
Password: 
Welcome to VyOS!

Check out project news at https://blog.vyos.io
and feel free to report bugs at https://phabricator.vyos.net

You can change this banner using "set system login banner post-login" command.

VyOS is a free software distribution that includes multiple components,
you can check individual component licenses under /usr/share/doc/*/copyright
vyos@vyos:~$ show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             192.168.0.100/24                  u/u  
eth1             -                                 u/u  
eth2             -                                 u/u  
eth3             -                                 u/u  
lo               127.0.0.1/8                       u/u  
                 ::1/128                                
vyos@vyos:~$ sudo journalctl -b | grep dhclient
Dec 22 10:40:11 vyos systemd[1]: Created slice system-dhclient.slice.
Dec 22 10:40:12 vyos dhclient-script-vyos[1289]: Current dhclient PID: 1276, Parent PID: 1268, IP version: 4, All dhclients for interface eth0: 1268 1276
Dec 22 10:40:12 vyos dhclient-script-vyos[1289]: Passing command to /usr/sbin/ip: "link set dev eth0 up"
Dec 22 10:40:12 vyos dhclient-script-vyos[1289]: No changes to apply via vyos-hostsd-client
Dec 22 10:40:12 vyos dhclient[1276]: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
Dec 22 10:40:12 vyos dhclient[1276]: DHCPOFFER of 192.168.0.100 from 172.16.20.1
Dec 22 10:40:12 vyos dhclient[1276]: DHCPREQUEST for 192.168.0.100 on eth0 to 255.255.255.255 port 67
Dec 22 10:40:12 vyos dhclient[1276]: DHCPACK of 192.168.0.100 from 172.16.20.1
Dec 22 10:40:12 vyos dhclient-script-vyos[1383]: Current dhclient PID: 1276, Parent PID: 1, IP version: 4, All dhclients for interface eth0: 1276
Dec 22 10:40:12 vyos dhclient-script-vyos[1383]: Passing command to /usr/sbin/ip: "-4 addr add 192.168.0.100/255.255.255.0 broadcast 192.168.0.255 valid_lft 86400 preferred_lft 86400 dev eth0 label eth0"
Dec 22 10:40:12 vyos dhclient-script-vyos[1383]: FRR status: running
Dec 22 10:40:12 vyos dhclient-script-vyos[1383]: Checking if the route presented in kernel: default via 192.168.0.1 dev eth0 metric 210
Dec 22 10:40:12 vyos dhclient-script-vyos[1383]: Converted vtysh command: "ip route 0.0.0.0/0 192.168.0.1 eth0 tag 210 210 "
Dec 22 10:40:12 vyos dhclient-script-vyos[1383]: Sending command to vtysh
Dec 22 10:40:13 vyos dhclient-script-vyos[1383]: Deleting nameservers with tag "dhcp-eth0" via vyos-hostsd-client
Dec 22 10:40:13 vyos dhclient-script-vyos[1383]: Adding nameservers "192.168.0.1 8.8.8.8" with tag "dhcp-eth0" via vyos-hostsd-client
Dec 22 10:40:13 vyos dhclient-script-vyos[1383]: Applying changes via vyos-hostsd-client
Dec 22 10:40:13 vyos dhclient-script-vyos[1383]: No changes to apply via vyos-hostsd-client
Dec 22 10:40:13 vyos dhclient[1276]: bound to 192.168.0.100 -- renewal in 41014 seconds.
vyos@vyos:~$ show ver | grep Ver
Version:          VyOS 1.4-rolling-202212200319
vyos@vyos:~$ 

I ran the installation again and got the same result. I used SnagIt to create a narrated video clip of the installation process so you could see what I did and what the results were, but I don’t see a way to upload a file. Just an FYI - I followed the same process when I created a VM for VyOS-1.1.8 and it worked without issue so not sure what is happening with VyOS-1.4. Perhaps it is something that I’m doing wrong, or something that Virtual Machine Manager is having trouble with.

Exact steps I followed:
Working on Ubuntu 20.04 64-bit VM in VMware Workstation.
Downloaded vyos-1.4-rolling-202212160319-amd64.iso
Opened Virtual Machine Manager (VMM) - UI to handle QEMU calls
Selected Created a new virtual machine
Chose use ISO image
Selected the ISO image
Selected 4096 GB memory
Selected 30GB Hard Disk
Set Hard Disk and Video to Virtio
Started Installation
Logged in once bootup completed
Ran “Install Image” to get image copied to hard disk
Accepted all defaults, then rebooted when complete and prompted to do so
Logged in once reboot completed
Ran configure and setup eth0: set interface ethernet eth0 address dhcp;commit;save;exit
Reboot
Logged back in
Executed ip a - no ip address

I’ve uploaded a screenshot of the journalctl command.

Is there anything in my description that would make it fail?

Check cat /config/config.boot section interfaces there should be “address dhcp” after saving
also you don’t need touch any other file like /etc/network/interfaces

I checked that file. Here is the output:

It looks like the configuration for the interface is being saved, but not honored at boot time.

Still not sure what is causing this issue, but I can reproduce it at will. Any other suggestions?

I also grabbed a shot of an error that is occurring when I reboot the VM. Not sure if it has anything to do with the issue at hand but an error is never good:

Are you sure you don’t have any other scripts to call dhcp-client?
It strange
Could you send “show version”?
Do you have access to the DHCP-server site? Check dumps/logs on the DHCP server site after/during reboot

Logs show that old dhclient was killed and it tries request DHCP address 8 times, for some reason the server doesn’t get IP address from DHCP-server, and service state is “failed”