Curious about 'localhost' for a ceph cluster

dswartz

Renowned Member
Dec 13, 2010
286
9
83
So I have three nodes, pve1, pve2 and pve3. Because I started off with pve1, the mon is called 'mon.localhost' and the manager is also 'localhost'. I'm assuming this is all OK, but it looks weird to see mons localhost, pve2 and pve3, as well as managers with the same naming convention. I also assume I can ignore this, but is there any safe way to rename these? Possibly by removing and adding?
 
Is your /etc/hosts configured correctly on that node?
What's in your /etc/hostname?

When you're sure your node is named correctly, then yes, the easiest way would be to recreate those.
 
Yes, /etc/hostname and /etc/hosts show pve.MYDOMAIN.com. And cluster status shows pve1, pve2 and pve3. It seems as if the ceph initialization code picks localhost for some reason...
 
Does it happen again if you destroy and recreate the monitor or manager?
 
Worked perfectly. stop mon.localhost, destroy mon.localhost, create mon (specify pve1), start mon.pve1.
Repeat above for mgr.localhost.

Thanks!
 
  • Like
Reactions: mira