I'm trying to install IBM Cloud Private on a VM. I've created master, proxy, and worker nodes and I'm at the last stage installing the ICP. However, I'm having a problem with the hostnames. The errors are shown below:
The error is below:
TASK [check : Validating Hostname is resolvable]
*******************************************************************
skipping: [172.16.22.190]
fatal: [172.16.22.82] => Hostname should be resolved to a valid IP address
fatal: [172.16.22.81] => Hostname should be resolved to a valid IP address
NO MORE HOSTS LEFT
********************************************************************************
NO MORE HOSTS LEFT
********************************************************************************
PLAY RECAP
********************************************************************************
172.16.22.190 : ok=4 changed=3 unreachable=0 failed=0
172.16.22.81 : ok=4 changed=3 unreachable=0 failed=1
172.16.22.82 : ok=4 changed=3 unreachable=0 failed=1
Playbook run took 0 days, 0 hours, 0 minutes, 4 seconds
My /etc/hosts file:
172.16.22.190 icp
172.16.22.81 proxy
172.16.22.82 worker
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
My cluster hosts file:
[master]
172.16.22.190
[worker]
172.16.22.82
[proxy]
172.16.22.81
#[management]
#4.4.4.4
All nodes see and ping each other and I'm using Ubuntu.
It turned out that hostnames of each node had to be same everywhere, not just on the /etc/hosts files of different nodes but also in /etc/hostname file of the node itself. It's a minor but an important mistake you can do if you are installing the server OS from a pre-loaded image :)