During installation, we filled in the machine’s fully qualifier domain name (FQDN) which can be rather long when it appears in cluster logs and status output. See for yourself how the machine identifies itself:
pcmk-1.clusterlabs.org
The output from the second command is fine, but we really don’t need the domain name included in the basic host details. To address this, we need to update /etc/sysconfig/network. This is what it should look like before we start.
NETWORKING=yes
HOSTNAME=pcmk-1.clusterlabs.org
GATEWAY=192.168.122.1
All we need to do now is strip off the domain name portion, which is stored elsewhere anyway.
Now confirm the change was successful. The revised file contents should look something like this.
NETWORKING=yes
HOSTNAME=pcmk-1
GATEWAY=192.168.122.1
However we’re not finished. The machine wont normally see the shortened host name until about it reboots, but we can force it to update.
Now check the machine is using the correct names
Now repeat on pcmk-2.