Page MenuHomeVyOS Platform

netplug: behavior change 1.3.8 -> 1.4 when interface with DHCP address looses carrier
Open, NormalPublicBUG

Description

There is a behavior change from VyOS 1.3.8 -> 1.4.0 as when an interface configured with DHCP will loose it's carrier in VyOS 1.3.8 dhclient is stopped and the IP address is removed from the interface.

In VyOS 1.4 the DHCP assigned IP address stays active on the interface that just lost it's carrier.

In addition this fixes a bug that was present in VyOS 1.3.8 where the DHCP assigned IP address only got cleared on base interfaces like eth0 but not on any VLAN interface e.g. eth0.10.

kernel: [  403.164085] igb 0000:01:00.0 eth0: igb: eth0 NIC Link is Down
dhclient[3875]: bound to 172.16.33.178 -- renewal in 37266 seconds.
netplugd[1008]: eth0: state ACTIVE flags 0x00011043 UP,BROADCAST,RUNNING,MULTICAST,10000 -> 0x00001003 UP,BROADCAST,MULTICAST
netplugd[4225]: /etc/netplug/netplug eth0 out -> pid 4225
dhclient[4230]: Killed old client process
systemd[1]: [email protected]: Main process exited, code=killed, status=15/TERM
dhclient[4231]: Internet Systems Consortium DHCP Client 4.4.1
dhclient[4231]: Internet Systems Consortium DHCP Client 4.4.1
dhclient[4231]: Copyright 2004-2018 Internet Systems Consortium.
dhclient[4231]: All rights reserved.
dhclient[4231]: For info, please visit https://www.isc.org/software/dhcp/
dhclient[4231]: Copyright 2004-2018 Internet Systems Consortium.
dhclient[4231]: All rights reserved.
dhclient[4231]: For info, please visit https://www.isc.org/software/dhcp/
dhclient[4231]:
dhclient[4231]: Listening on LPF/eth0/00:50:00:00:2b:58
dhclient[4231]: Listening on LPF/eth0/00:50:00:00:2b:58
dhclient[4231]: Sending on   LPF/eth0/00:50:00:00:2b:58
dhclient[4231]: Sending on   Socket/fallback
dhclient[4231]: Sending on   LPF/eth0/00:50:00:00:2b:58
dhclient[4231]: Sending on   Socket/fallback
dhclient[4231]: DHCPRELEASE of 172.16.33.178 on eth0 to 172.16.33.254 port 67
dhclient[4231]: DHCPRELEASE of 172.16.33.178 on eth0 to 172.16.33.254 port 67
dhclient[4231]: send_packet: Network is unreachable
dhclient[4231]: send_packet: please consult README file regarding broadcast address.
dhclient[4231]: dhclient.c:2878: Failed to send 300 byte long packet over fallback interface.
dhclient[4231]: send_packet: Network is unreachable
dhclient[4231]: send_packet: please consult README file regarding broadcast address.
dhclient[4231]: dhclient.c:2878: Failed to send 300 byte long packet over fallback interface.
dhclient-script-vyos[4232]: Current dhclient PID: 4231, Parent PID: 1, IP version: 4, All dhclients for interface eth0: 4227 4230 4231
dhclient-script-vyos[4232]: Stopping dhclient with PID: 4227, PID file: , Leases file:
dhclient-script-vyos[4232]: PID file  does not exists, killing dhclient with SIGTERM signal
netplugd[1008]: eth0: state OUTING pid 4225 exited status 256
dhclient-script-vyos[4232]: Stopping dhclient with PID: 4230, PID file: /var/lib/dhcp/dhclient_eth0.pid, Leases file: /var/lib/dhcp/dhclient_eth0.leases
dhclient-script-vyos[4232]: PID file /var/lib/dhcp/dhclient_eth0.pid does not exists, killing dhclient with SIGTERM signal
dhclient-script-vyos[4232]: Passing command to /usr/sbin/ip: "-4 addr flush dev eth0 label eth0"
dhclient-script-vyos[4232]: Deleting search domains with tag "dhcp-eth0" via vyos-hostsd-client
vyos-hostsd[572]: Request data: {"type": "search_domains", "op": "delete", "data": ["dhcp-eth0"]}
vyos-hostsd[572]: Saving state to /run/vyos-hostsd/vyos-hostsd.state
vyos-hostsd[572]: Sent response: {'data': None}
dhclient-script-vyos[4232]: Deleting nameservers with tag "dhcp-eth0" via vyos-hostsd-client
vyos-hostsd[572]: Request data: {"type": "name_servers", "op": "delete", "data": ["dhcp-eth0"]}
vyos-hostsd[572]: Saving state to /run/vyos-hostsd/vyos-hostsd.state
vyos-hostsd[572]: Sent response: {'data': None}
dhclient-script-vyos[4232]: Deleting default route: via 172.16.33.254 dev eth0 metric 210
dhclient-script-vyos[4232]: FRR status: running
dhclient-script-vyos[4232]: Checking if the route presented in kernel: default via 172.16.33.254 dev eth0 metric 210
dhclient-script-vyos[4232]: Converted vtysh command: "no ip route 0.0.0.0/0 172.16.33.254 eth0 tag 210 210 "
dhclient-script-vyos[4232]: Sending command to vtysh
ntpd[1920]: Deleting interface #5 eth0, fe80::20d:b9ff:fe59:2b58%2#123, interface stats: received=0, sent=0, dropped=0, active_time=307 secs
ntpd[1920]: Deleting interface #7 eth0, 172.16.33.178#123, interface stats: received=5, sent=6, dropped=0, active_time=17 secs
ntpd[1920]: 18.193.41.138 local addr 172.16.33.178 -> <null>
ntpd[1920]: 122.248.201.177 local addr 172.16.33.178 -> <null>
ntpd[1920]: 34.206.168.146 local addr 172.16.33.178 -> <null>
dhclient-script-vyos[4232]: Applying changes via vyos-hostsd-client
vyos-hostsd[572]: Request data: {"op": "apply"}
vyos-hostsd[572]: Applying 2 changes
vyos-hostsd[572]: Writing /etc/resolv.conf
vyos-hostsd[572]: Writing /etc/hosts
vyos-hostsd[572]: Writing /run/powerdns/recursor.vyos-hostsd.conf.lua
vyos-hostsd[572]: Writing /run/powerdns/recursor.forward-zones.conf
vyos-hostsd[572]: pdns_recursor not running, not sending "reload-lua-config"
vyos-hostsd[572]: pdns_recursor not running, not sending "reload-zones"
vyos-hostsd[572]: Success
vyos-hostsd[572]: Saving state to /run/vyos-hostsd/vyos-hostsd.state
vyos-hostsd[572]: Sent response: {'data': {'message': 'Applied 2 changes'}}
systemd[1]: [email protected]: Succeeded.
systemd[1]: [email protected]: Service RestartSec=100ms expired, scheduling restart.
systemd[1]: [email protected]: Scheduled restart job, restart counter is at 1.
systemd[1]: Stopped DHCP client on eth0.
vyos@vyos# run show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             -                                 u/D
eth1             -                                 u/D
eth2             -                                 u/D
eth3             -                                 u/D
lo               127.0.0.1/8                       u/u
                 ::1/128
wlan0            -                                 A/D
wwan0            -                                 A/D
vyos@vyos# ip addr show dev eth0
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 00:50:00:00:2b:58 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::250:00ff:fe00:2b58/64 scope link
       valid_lft forever preferred_lft forever

https://github.com/vyos/vyos-1x/blob/equuleus/src/etc/netplug/linkdown.d/dhclient

Details

Version
1.4.2
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

c-po claimed this task.
c-po triaged this task as Normal priority.
c-po changed Version from 1.4.0 to 1.4.2.

Fun fact: removal of the DHCP assigned IP address in VyOS 1.3.8 only works if dhcp client runs on the native interface. If dhcp is run on a vif - this also does not work

c-po edited projects, added VyOS 1.4 Sagitta (1.4.3); removed VyOS 1.4 Sagitta.
c-po moved this task from Backlog to Finished on the VyOS 1.4 Sagitta (1.4.3) board.
c-po moved this task from Need Triage to Completed on the VyOS Rolling board.
c-po moved this task from Completed to Backlog - Bug on the VyOS Rolling board.
c-po moved this task from Finished to Backlog on the VyOS 1.4 Sagitta (1.4.3) board.