Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-39957

NetworkManager doesn't run the dispatcher scripts when the NTP server changes after a DHCP renewal

    • NetworkManager-1.43.6-1.el9
    • None
    • None
    • ZStream
    • rhel-sst-network-management
    • ssg_networking
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Approved Blocker
    • None
    • None
    • None

      Description of problem:

      When the DHCP lease is renewed and there's a change in the NTP server, the
      dispatcher scripts are not run and therefore chrony is not updated
      to use the new NTP server.

      The only workaround is to bring down/up the connection via nmcli. After
      the connection is brought back up, chrony shows the updated NTP server.

      Version-Release number of selected component (if applicable):

      This has been tested on NetworkManager-1.36.0-7.el8_6 and
      NetworkManager-1.40.0-5.el8_7, both behave as described above.

      When testing the same on NetworkManager-1.32.10-5.el8_5, a "dhcp4-change"
      event is triggered when the NTP-server option changes, the dispatcher
      scripts are run, and chrony is updated successfuly with the new NTP server.

      Looks like a problem introduced in RHEL8.6 after NM was updated from 1.32 to 1.36

      How reproducible:

      Always

      Steps to Reproduce:

      • create a pair of veth, add a new ns for the peer, configure an IP on the
        peer, and build a DHCP NM connection on the client

      $ sudo ip link add dhcpifc type veth peer name dhcpifd
      $ sudo ip netns add dhcps
      $ sudo ip link set dhcpifd netns dhcps

      $ sudo nmcli con add con-name dhcpifc type ethernet \
      ifname dhcpifc ipv6.method disabled ipv4.method auto \
      ipv4.ignore-auto-routes yes

      $ sudo ip netns exec dhcps ip add add 10.9.9.1/24 dev dhcpifd
      $ sudo ip netns exec dhcps ip link set dhcpifd up

      • Run a simple dnsmasq dhcp server with a short lease time on the peer interface:

      $ sudo ip netns exec dhcps dnsmasq d -C <<EOF
      interface=dhcpifd
      port=0
      dhcp-range=10.9.9.100,10.9.9.110,255.255.255.0,60s
      dhcp-option=option:ntp-server,10.9.9.12
      EOF

      • Bring the DHCP connection up. Wait until the DHCP settings are configured

      $ sudo nmcli con dhcpifc up

      • Check the chrony sources. The NTP server provided initially is configured

      $ sudo chronyc -n sources | grep 10.9
      ^? 10.9.9.12 0 7 0 - +0ns[ +0ns] +/- 0ns

      • Before the DHCP is renewed, modify the NTP server option and re-run dnsmasq

      $ sudo ip netns exec dhcps dnsmasq d -C <<EOF
      interface=dhcpifd
      port=0
      dhcp-range=10.9.9.100,10.9.9.110,255.255.255.0,60s
      dhcp-option=option:ntp-server,10.9.9.10
      EOF

      • After the renewal, re-check the chrony sources. The new NTP server has not been configured

      $ sudo chronyc -n sources | grep 10.9
      ^? 10.9.9.12 0 8 0 - +0ns[ +0ns] +/- 0ns

      Actual results:

      Chrony is not updated to use new NTP server provided

      Expected results:

      Chrony should be updated to use new NTP server provided

      Additional info:

      This is easily reproducible on RHEL8.6+ and RHEL9 using the mentioned NetworkManager versions.
      If there's log/trace required please let me know and I'll upload it.

              bgalvani@redhat.com Beniamino Galvani
              rhn-support-juasanch Juanma Sanchez
              Filip Pokryvka Filip Pokryvka
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: