You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In WALA version 2.2.3 we included change: #533 to go from setting the hostname via changing /etc/hostname to using hostnamectl. A result of this change was the logic in the Red Hat utility to move to lowercase was then applied. Per their documentation:
A host name can be a free-form string up to 64 characters in length. However, Red Hat recommends that both static and transient names match the fully-qualified domain name (FQDN) used for the machine in DNS, such as host.example.com. It is also recommended that the static and transient names consists only of 7 bit ASCII lower-case characters, no spaces or dots, and limits itself to the format allowed for DNS domain name labels, even though this is not a strict requirement. Older specifications do not permit the underscore, and so their use is not recommended.
hostnameclt enforces this recommendation unless you tell it not to via the --static switch.
Repo steps
Provision a new RHEL 7.x VM from marketplace
name vm TEST-LOWER (capitalized)
SSH into VM
Expect behavior: VM name is TEST-LOWER
Actual behavior: VM name is test-lower
More info/Analysis
Hostname is set during provisioning from the ovf-env file based on what was provided in the Azure portal:
2017/04/27 14:47:19.317120 INFO Handle ovf-env.xml.
2017/04/27 14:47:19.320364 INFO Set hostname [TEST-LOWER]
2017/04/27 14:47:19.732764 INFO Publish hostname [TEST-LOWER]
Azure Linux agent provisioning will call set_hostname which will call hostnamectl
hostnamectl will set the hostname in lowercase
Azure Linux agent background process that monitors for hostname changes 5. The next time the monitoring occurs the agent see the difference between upper and lower case names and again calls sethostname which will call hostnamectl. This is a bit confusing because although the agent is using the cached ovf-env name the actual hostname is already lowercase at this point.
2017/04/27 14:47:28.524685 INFO EnvMonitor: Detected hostname change: TEST-LOWER -> test-lower
Setting the hostname to a upper case value, manually or otherwise, using hostnamectl without --static will result in lower case static hostname
$ sudo hostnamectl status
Static hostname: test-lower
Pretty hostname: TEST-LOWER
Icon name: computer-vm
Chassis: vm
Machine ID: ade8768222574cb5a05e4d6ca79988c0
Boot ID: abe975d033db44dd868ae00c50534ec0
Virtualization: microsoft
Operating System: Red Hat Enterprise Linux Server 7.2 (Maipo)
CPE OS Name: cpe:/o:redhat:enterprise_linux:7.2:GA:server
Kernel: Linux 3.10.0-514.16.1.el7.x86_64
The text was updated successfully, but these errors were encountered:
Summary
In WALA version 2.2.3 we included change: #533 to go from setting the hostname via changing /etc/hostname to using hostnamectl. A result of this change was the logic in the Red Hat utility to move to lowercase was then applied. Per their documentation:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/ch-Configure_Host_Names.html#sec_Understanding_Host_Names
hostnameclt enforces this recommendation unless you tell it not to via the
--static
switch.Repo steps
More info/Analysis
The text was updated successfully, but these errors were encountered: