Bug 1416199

Summary: Munin-node is unable to determine FQDN hostname at boot
Product: [Fedora] Fedora EPEL Reporter: Grigory Trenin <gtrenin>
Component: muninAssignee: Kim B. Heino <b>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: epel7CC: b, drjohnson1, ingvar
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: munin-2.0.40-2.fc28 munin-2.0.40-2.el6 munin-2.0.40-2.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-06 03:09:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Grigory Trenin 2017-01-24 20:45:26 UTC
Description of problem:

Munin-node starts after the network.target which doesn't guarantee that network interfaces are up. As a result, Munin-node is not always able to determine FQDN hostname at boot because Munin-node uses hostname()+gethostbyname() pair which requires either FQDN hostname to be present in /etc/hosts or working DNS server early at boot (which is definitely not the case when the network interfaces were not brought up yet).

This produces an inconsistent behaviour. Early at boot Munin determines non-FQDN hostname, but if munin-node service is later restarted manually it determines FQDN hostname.

Version-Release number of selected component (if applicable):
RHEL 7.3
munin-2.0.25-11.el7

How reproducible:
Always

Steps to Reproduce:
1. Make sure the system is using short (non-FQDN) hostname
2. Make sure that hostname entry is not present in /etc/hosts. For example, take a default /etc/hosts file with "127.0.0.1   localhost ..." entries only.
3. Reboot the system, then telnet to port 4949. You'll see that Munin advertises itself with (short) non-FQDN hostname.
4. Restart Munin node: systemctl restart munin-node.
   Telnet to port 4949 again. You'll see that now Munin advertises itself with FQDN hostname.


Additional info:

This can be remediated by adding FQDN hostname to /etc/hosts, but this is probably not a good idea.
Suggested fix is to change /lib/systemd/system/munin-node.service file to start munin-node after network-online.target instead of network-target:

-After=network.target
+After=network-online.target

Comment 1 Fedora Update System 2018-08-25 08:36:07 UTC
munin-2.0.40-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-60e7ab00eb

Comment 2 Fedora Update System 2018-08-25 08:36:59 UTC
munin-2.0.40-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-e42294dd9f

Comment 3 Fedora Update System 2018-08-25 08:37:33 UTC
munin-2.0.40-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-d7fccd52d3

Comment 4 Fedora Update System 2018-08-25 22:37:15 UTC
munin-2.0.40-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-60e7ab00eb

Comment 5 Fedora Update System 2018-08-25 23:05:05 UTC
munin-2.0.40-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-d7fccd52d3

Comment 6 Fedora Update System 2018-08-25 23:06:05 UTC
munin-2.0.40-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-e42294dd9f

Comment 7 Fedora Update System 2018-09-06 03:09:01 UTC
munin-2.0.40-2.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2018-09-11 13:47:40 UTC
munin-2.0.40-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2018-09-11 14:44:31 UTC
munin-2.0.40-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.