Bug 1056683

Summary: wickedd, dhcp rebind does not change the gateway
Product: [openSUSE] openSUSE Distribution Reporter: Ruediger Meier <sweet_f_a>
Component: NetworkAssignee: wicked maintainers <wicked-maintainers>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Leap 42.3   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Ruediger Meier 2017-08-31 16:34:56 UTC
Today our dhcp server was replaced by another one. (The uplink port of the switch was changed.)

Our 42.3 clients logged:

Aug 31 17:03:50 amseins wickedd-dhcp4[981]: eth0: Committed DHCPv4 lease with address 10.3.22.7 (lease time 86400 sec, renew in 43200 sec, rebind in 75600 sec)
Aug 31 17:03:50 amseins avahi-daemon[845]: Withdrawing address record for 192.168.30.51 on eth0.
Aug 31 17:03:50 amseins avahi-daemon[845]: Registering new address record for 10.3.22.7 on eth0.IPv4.
Aug 31 17:03:50 amseins wickedd[987]: route ipv4 0.0.0.0/0 via 192.168.30.1 dev eth0#2 type unicast table main scope universe protocol dhcp covered by a ipv4:dhcp lease

They still kept the old gateway.

$ ip r
default via 192.168.30.1 dev eth0  proto dhcp
10.3.22.0/24 dev eth0  proto kernel  scope link  src 10.3.22.7

So, I couldn't reach them without calling somebody to go to the clients and
reboot them. Note the old dhcp server had fairly short timeout settings (lease
time 3600 sec, renew in 1800 sec, rebind in 3150 sec)


This is the current lease where you see the gateway which should be used:
 
$ cat /var/lib/wicked/lease-eth0-dhcp-ipv4.xml
<lease>
  <family>ipv4</family>
  <type>dhcp</type>
  <state>granted</state>
  <update>0x00000000</update>
  <acquired>1504191829</acquired>
  <ipv4:dhcp>
    <client-id>01:4c:cc:6a:1b:f9:bf</client-id>
    <server-id>10.3.22.254</server-id>
    <sender-hw-address>c0:ea:e4:86:53:e7</sender-hw-address>
    <lease-time>86400</lease-time>
    <renewal-time>43200</renewal-time>
    <rebind-time>75600</rebind-time>
    <address>10.3.22.7</address>
    <netmask>255.255.255.0</netmask>
    <routes>
      <route>
        <nexthop>
          <gateway>10.3.22.254</gateway>
        </nexthop>
      </route>
    </routes>
    <dns>
      <server>8.8.4.4</server>
      <server>8.8.8.8</server>
    </dns>
  </ipv4:dhcp>
</lease>
Comment 1 Arjen de Korte 2018-01-12 22:27:42 UTC
I see something similar here. DHCPv4 leases aquired by wickedd never timeout. I have two different types of clients connecting to the same DHCPv4 server. They are on different networks, but are both served with identical settings (1 hour leases).

Client using wickedd:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    inet 172.16.1.10/16 brd 172.16.255.255 scope global eth0
       valid_lft forever preferred_lft forever

Client with Network Manager:

3: wlp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    inet 192.168.1.100/24 brd 192.168.1.255 scope global dynamic wlp2s0
       valid_lft 3472sec preferred_lft 3472sec

Note that the valid- and preferred lifetimes for wickedd are forever, while the client which uses NM counts down from 3600. The latter will timeout automatically if the server can't be reached, but the former will keep using the IP address, even if it can't connect to the DHCP server.

Strange enough, DHCPv6 behavior is idential (= correct) for both wickedd and NM.
Comment 2 Tomáš Chvátal 2019-07-11 11:18:54 UTC
This is automated batch bugzilla cleanup.

The openSUSE 42.3 changed to end-of-life (EOL [1]) status. As such
it is no longer maintained, which means that it will not receive any
further security or bug fix updates.
As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
openSUSE (At this moment openSUSE Leap 15.1, 15.0 and Tumbleweed) please
feel free to reopen this bug against that version (!you must update the
"Version" component in the bug fields, do not just reopen please), or
alternatively create a new ticket.

Thank you for reporting this bug and we are sorry it could not be fixed
during the lifetime of the release.

[1] https://en.opensuse.org/Lifetime