Forums

Home / Forums

You need to log in to create posts and topics. Login · Register

Missing hosts in /etc/hosts

Hi,

I have a 5 node cluster. petasan-0 - petasan-2 are the management servers. also have petasan-3 and petasan-6 as storage.

Noticed today that my graphs are not showing in the GUI and getting a "request error". When I look in PetaSAN.log I see many:

26/08/2019 10:00:11 ERROR ssh: Could not resolve hostname petasan-2: Temporary failure in name resolution

26/08/2019 10:00:31 ERROR ssh: Could not resolve hostname petasan-1: Temporary failure in name resolution

26/08/2019 10:00:38 ERROR ssh: Could not resolve hostname petasan-0: Temporary failure in name resolution

and /etc/hosts file just shows the following:

root@petasan-0:/etc# more hosts
10.55.55.56 petasan-6
10.55.55.53 petasan-3

#1 - what happened to my three management nodes in the hosts file??

#2 - can I just add them back in and all will be well? Everything else seems to be working fine.

Regards....

you should be able to edit the /etc/hosts yourself. not sure why you see this.

Manually edited the entries in /opt/petasan/config/etc/hosts on all 5 nodes.

root@petasan-0:~# more /etc/hosts
10.55.55.50 petasan-0
10.55.55.51 petasan-1
10.55.55.52 petasan-2
10.55.55.56 petasan-6
10.55.55.53 petasan-3
root@petasan-0:~# ping petasan-1
PING petasan-1 (10.55.55.51) 56(84) bytes of data.
64 bytes from petasan-1 (10.55.55.51): icmp_seq=1 ttl=64 time=0.061 ms
64 bytes from petasan-1 (10.55.55.51): icmp_seq=2 ttl=64 time=0.063 ms
64 bytes from petasan-1 (10.55.55.51): icmp_seq=3 ttl=64 time=0.077 ms
^C
--- petasan-1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2039ms
rtt min/avg/max/mdev = 0.061/0.067/0.077/0.007 ms

 

5 minutes later, the file no longer has the management hosts entries.

This happened on all 5 nodes. Some process or script must be removing them...
root@petasan-0:~# more /etc/hosts
10.55.55.56 petasan-6
10.55.55.53 petasan-3

 

  • Regards..

Pardon me, this file needs to be synced using Consul clustering service:

# stop auto sync service on current node
systemctl stop petasan-file-sync
# manual fix hosts file
nano /etc/hosts
# sync the hosts file to all nodes:
/opt/petasan/scripts/util/sync_file.py /etc/hosts
# restart the sync service on current node
systemctl start petasan-file-sync

That seems like it resolved that issue for the /etc/hosts files.

I will open more threads for some other issues I am seeing.

Thank you