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.

{u'message': u' [host_name] is not a valid node managed by this compute host.'

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().

# python -c 'import socket; print socket.getfqdn()'
  • Verify if the nslookup command is returning the updated hostname. This would indicate that there's no issue with DNS resolution

nslookup [updated hostname]
  • 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:

  1. socket.getfqdn() function returns the expected hostname.

  2. DNS resolution is functional.

  3. For the IPv4 localhost entry in /etc/hosts, the hostname is included as the first entry.

  1. Restart the pf9-hostagent service.

Additional Information

If using pf9-expressarrow-up-right, 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.

Last updated