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

NM floods syslog with hostname messages

    • No
    • Moderate
    • rhel-sst-network-management
    • ssg_networking
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Hide

      Given a system where the hostname has not been explicitly set during installation, and NetworkManager defaults to "localhost.localdomain",

      When NetworkManager attempts to set the hostname and detects no change to the default hostname (e.g., "localhost.localdomain"),

      Then, NetworkManager should log the "set hostname" message only once and suppress repeated identical messages unless there is an actual change in the hostname configuration.

      Definition of Done:

      • The implementation meets the acceptance criteria
      • Integration tests are written and pass 
      • The fix is part of a downstream build attached to an errata
      Show
      Given a system where the hostname has not been explicitly set during installation, and NetworkManager defaults to "localhost.localdomain", When NetworkManager attempts to set the hostname and detects no change to the default hostname (e.g., "localhost.localdomain"), Then, NetworkManager should log the "set hostname" message only once and suppress repeated identical messages unless there is an actual change in the hostname configuration. Definition of Done: The implementation meets the acceptance criteria Integration tests are written and pass  The fix is part of a downstream build attached to an errata
    • None
    • None
    • None

      What were you trying to do that didn't work?

      I installed a test machine that has only 1 wired connection that is not being used, and 1 wifi one that is used. I didn't configure hostname during installation, and then noticed NM logging this:

      Sep 05 14:27:09 localhost.localdomain NetworkManager[3380]: <info> [1725557229.9708] policy: set-hostname: set hostname to 'localhost.localdomain' (no hostname found)
      Sep 05 14:27:10 localhost.localdomain NetworkManager[3380]: <info> [1725557230.9880] policy: set-hostname: set hostname to 'localhost.localdomain' (no hostname found)
      Sep 05 14:27:12 localhost.localdomain NetworkManager[3380]: <info> [1725557232.0120] policy: set-hostname: set hostname to 'localhost.localdomain' (no hostname found)
      Sep 05 14:27:13 localhost.localdomain NetworkManager[3380]: <info> [1725557233.0440] policy: set-hostname: set hostname to 'localhost.localdomain' (no hostname found)
      Sep 05 14:27:13 localhost.localdomain NetworkManager[3380]: <info> [1725557233.9649] policy: set-hostname: set hostname to 'localhost.localdomain' (no hostname found)
      Sep 05 14:27:14 localhost.localdomain NetworkManager[3380]: <info> [1725557234.9881] policy: set-hostname: set hostname to 'localhost.localdomain' (no hostname found)
      Sep 05 14:27:16 localhost.localdomain NetworkManager[3380]: <info> [1725557236.0122] policy: set-hostname: set hostname to 'localhost.localdomain' (no hostname found)

      I then tried setting the hostname with:
      [root@localhost ~]# hostnamectl hostname localhost.localdomain
      [root@localhost ~]# hostnamectl
      Static hostname: localhost.localdomain
      Transient hostname: localhost
      Icon name: computer-desktop
      Chassis: desktop 🖥
      Machine ID: 9f029d4cdf584137a06dd37ae5773edf
      Boot ID: 655eda2b15fa40eca921db0a87f8647b
      Operating System: Red Hat Enterprise Linux 9.4 (Plow)
      CPE OS Name: cpe:/o:redhat:enterprise_linux:9::baseos
      Kernel: Linux 5.14.0-427.33.1.el9_4.x86_64
      Architecture: x86-64
      Hardware Vendor: Micro-Star International Co., Ltd.
      Hardware Model: MS-7D76
      Firmware Version: A.80

      And restarted NM, and even rebooted, but it didn't help with the issue.

      Please provide the package NVR for which bug is seen:

      [root@localhost ~]# rpm -q NetworkManager
      NetworkManager-1.46.0-19.el9_4.x86_64

      How reproducible:

      Always

      Steps to reproduce

      Not sure. It just happens here.

      I can't tell how related this is to https://issues.redhat.com/browse/RHEL-53202
      I only noticed that there was an issue after I had already updated to 9.4.z and for some reason, journal don't have any entry from previous boots.

              rh-ee-sfaye Stanislas Faye
              rhn-support-mleitner Marcelo Leitner
              Network Management Team Network Management Team
              Vladimir Benes Vladimir Benes
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: