Host Authorized with Differing/Unexpected Hostname
Problem
- A host authorized with Platform9 is displaying its name as "localhost", its FQDN is omitted, or it otherwise differs from that of its actual, expected hostname.
- If the host is authorized with Platform9 Managed OpenStack, instance operations for instances residing on the host may fail with the following error.
Environment
- Platform9 Managed OpenStack - All Versions
- Platform9 Managed Kubernetes - All Versions
Cause
- The pf9-hostagent service obtains the hostname using the Python function socket.getfqdn().
- Verify if the nslookup command is returning the updated hostname. This would indicate that there's no issue with DNS resolution
- If nslookup command returns the right hostname, check if there are any old entries associated with the older hostname in the /etc/hosts.
Resolution
Ensure the following:
- socket.getfqdn() function returns the expected hostname.
- DNS resolution is functional.
- For the IPv4 localhost entry in /etc/hosts, the hostname is included as the first entry.
- Restart the pf9-hostagent service.
Additional Information
If using pf9-express, ensure the Manage Hostname option is set to true during the configuration process to automatically add the hostname entry for localhost on deployment.
The option may be set directly in pf9-express.conf. file as well.
Was this page helpful?