Page MenuHomeVyOS Platform

Dhcpv6-relay does not start on boot
Closed, ResolvedPublicBUG

Description

isc-dhcp-relay6.service fails to start on boot. This unit should start the dhcpv6-relay daemon. The failure is because the referenced interface does not have an IPv6 address. The interfaces do not have IPv6 addresses because prefix delegation has not completed assigning the addresses.

Version: VyOS 1.4-rolling-202211110728
set service dhcpv6-relay listen-interface eth3
set service dhcpv6-relay upstream-interface eth2 address '2600:1900:3e60:c29f::5

The work around I found was to edit the /usr/lib/systemd/system/isc-dhcp-relay6.service to slow down the daemon restart attempts. The distribution service file includes Restart=always but the default retry speed is too fast to allow the IPv6 address assignments to complete.

I added these statements in the sections shown. This and it works. It appears to take about 20 seconds for the addresses to materialize.

[unit]
StartLimitBurst=10
StartLimitIntervalSec=60

[service]
RestartSec=5

Details

Difficulty level
Easy (less than an hour)
Version
VyOS 1.4-rolling-202211110728
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

Tested on VyOS 1.3.3

set service dhcpv6-relay listen-interface eth1
set service dhcpv6-relay upstream-interface eth0 address '2001:db8::4'

after reboot

[email protected]:~$ systemctl status isc-dhcp-relay6.service
● isc-dhcp-relay6.service - ISC DHCP IPv6 relay
   Loaded: loaded (/lib/systemd/system/isc-dhcp-relay6.service; disabled; vendor preset: enabled)
   Active: active (running) since Sun 2023-06-11 09:39:52 CEST; 1min 52s ago
     Docs: man:dhcrelay(8)
 Main PID: 1799 (dhcrelay)
    Tasks: 1 (limit: 1148)
   Memory: 5.4M
   CGroup: /system.slice/isc-dhcp-relay6.service
           └─1799 /usr/sbin/dhcrelay -6 -pf /run/dhcp-relay/dhcrelay6.pid -l eth1 -u 2001:db8::4 eth0 -c 10

Jun 11 09:39:52 LR2.wue3 dhcrelay[1798]: Sending on   Socket/eth1
Jun 11 09:39:52 LR2.wue3 dhcrelay[1799]: Listening on Socket/eth0.201
Jun 11 09:39:52 LR2.wue3 dhcrelay[1799]: Sending on   Socket/eth0.201
Jun 11 09:39:52 LR2.wue3 dhcrelay[1799]: Listening on Socket/eth2
Jun 11 09:39:52 LR2.wue3 dhcrelay[1799]: Sending on   Socket/eth2
Jun 11 09:39:52 LR2.wue3 dhcrelay[1799]: Listening on Socket/eth0
Jun 11 09:39:52 LR2.wue3 systemd[1]: Started ISC DHCP IPv6 relay.
Jun 11 09:39:52 LR2.wue3 dhcrelay[1799]: Sending on   Socket/eth0
Jun 11 09:39:52 LR2.wue3 dhcrelay[1799]: Listening on Socket/eth1
Jun 11 09:39:52 LR2.wue3 dhcrelay[1799]: Sending on   Socket/eth1

So issue does not appear on 1.3.3

c-po changed the task status from Open to Needs testing.Jun 11 2023, 7:43 AM
c-po assigned this task to cuongdt1994.
c-po triaged this task as Normal priority.
c-po changed Difficulty level from Unknown (require assessment) to Easy (less than an hour).
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.

@cuongdt1994 Could you check it? If it works as expected, we can close it.

Yes, checked it working, please closed it.