Bug #6711
closedHostname in inventory may sometimes be wrongfully in lowercase
Description
On some systems (especially AIX), the hostname in the inventory is always on lowercase; which is wrong
Command
/opt/rudder/bin/rudder-perl -e "use Sys::Hostname; print Sys::Hostname::hostname();"
returns the proper hostname, while sys.fqhost returns an hostname with invalid case
We should use the perl approch, when available (not on Android then) for the hostname
Updated by Nicolas CHARLES over 9 years ago
another solution could be to use hostname in fusioninventory inventory
Updated by Nicolas CHARLES over 9 years ago
- Assignee set to François ARMAND
- Target version changed from 2.11.12 to 3.1.0~rc1
this change is too big to go to 2.11, but it would go in 3.1: it is safer to use reliable hostname from fusion inventory
Updated by Nicolas CHARLES over 9 years ago
Oh ... the Rudder extension in Fusion inventory contains the hostname (but it is only on linux)
In OPERATINGSYSTEM/FQDN we have the fqdn of the node, which exists on AIX, Windows, and is correctly filled (using http://search.cpan.org/~gbarr/libnet-1.22/Net/Domain.pm )
Updated by Nicolas CHARLES over 9 years ago
according to fusioninventory team, HARDWARE/NAME should be the right one
Updated by Nicolas CHARLES over 9 years ago
OPERATINGSYSTEM/FQD should have the correct content
However, i'm puzzled by current parsing:
we parse the inventory, and if we have HARDWARE/NAME, we set the node name to this value
then if we have Rudder expansion, we parse them, and use RUDDER/HOSTNAME
the deprecated HOSTNAME seems to be never used
Updated by Vincent MEMBRÉ over 9 years ago
- Status changed from New to In progress
- Assignee changed from François ARMAND to Vincent MEMBRÉ
Updated by Nicolas CHARLES over 9 years ago
- Assignee changed from Vincent MEMBRÉ to François ARMAND
Ha, Vincent gave me some more info on this point:
- OS/NAME is not used as the hostname, but as the node.name (tricky...)
- Main value for hostname is RUDDER/HOSTNAME.
- If RUDDER/HOSTNAME doesn't exist, then we use HOSTNAME
HOSTNAME is always lowercase, while RUDDER/HOSTNAME has the proper case
What we want: something consistent
OPERATINGSYSTEM/FQDN is always consistent (proper case with the proper fqdn)
RUDDER/HOSTNAME has the proper case (but without the domain name always, as it uses hostname --fqd that may work per chance (as the proper attribute is --fqdn))
HOSTNAME is always lowercase, and may, or may not, have the domain name
HARDWARE/NAME has the proper case, but without the domain name
So, we should pick OPERATINGSYSTEM/FQDN if available, if not RUDDER/HOSTNAME, if not HARDWARE/NAME
Updated by Nicolas CHARLES over 9 years ago
- Status changed from In progress to Pending technical review
- Pull Request set to https://github.com/Normation/ldap-inventory/pull/66/files
Updated by Nicolas CHARLES over 9 years ago
Ok, for sanity, we only pick OPERATINGSYSTEM/FQDN
So that we are ensuring consistency of value, it is easier, less error prone, and this value exists since in along time in fusion
Updated by Nicolas CHARLES over 9 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset ldap-inventory|18f7fc3afb4a60637920f3369354af4b6afce851.
Updated by François ARMAND over 9 years ago
Applied in changeset ldap-inventory|e628150d3df486549e0e1db58bc255966a862fcd.
Updated by Alexis Mousset over 9 years ago
- Related to Bug #6782: Broken inventory - missing 'FQDN' added
Updated by Vincent MEMBRÉ over 9 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 3.1.0~rc1 which was released on the 16th June 2015.
- Announcement 3.1
- Changelog 3.1
- Download information: https://www.rudder-project.org/site/get-rudder/downloads/
Updated by Nicolas CHARLES over 9 years ago
- Related to Bug #7001: If domain name is not set in resolv.conf, the inventory generated is invalid added
Updated by Nicolas CHARLES over 9 years ago
- Related to Bug #7015: Some inventories have empty FQDN attribute, mandatory in 3.1 added
Updated by Nicolas CHARLES over 9 years ago
- Related to Bug #7031: Inventory <FQDN> content differs from hostname --fqdn and may lead to unauthorised nodes added