[SOLVED] Wrong node IP

danielb

Renowned Member
Jun 1, 2018
232
65
68
39
Bordeaux (france)
Hi there.
Due to a bad entry in /etc/hosts, one member of my 3-nodes cluster has the wrong IP in the cluster info.
Code:
root@pve2:~# pvesh get /cluster/status --output-format=json-pretty
[
   {
      "id" : "cluster",
      "name" : "fws1",
      "nodes" : 3,
      "quorate" : 1,
      "type" : "cluster",
      "version" : 9
   },
   {
      "id" : "node/pve3",
      "ip" : "10.29.254.3",
      "level" : "",
      "local" : 0,
      "name" : "pve3",
      "nodeid" : 3,
      "online" : 1,
      "type" : "node"
   },
   {
      "id" : "node/pve1",
      "ip" : "195.34.16.162",
      "level" : "",
      "local" : 0,
      "name" : "pve1",
      "nodeid" : 1,
      "online" : 1,
      "type" : "node"
   },
   {
      "id" : "node/pve2",
      "ip" : "10.29.254.2",
      "level" : "",
      "local" : 1,
      "name" : "pve2",
      "nodeid" : 2,
      "online" : 1,
      "type" : "node"
   }
]
root@pve2:~#

You can see node "pve1" report its public IP (195.34.16.162) instead of its private one (10.29.254.1). The strange thing is, from corosync POV, everything is fine, so, the cluster is working without any issue:

Code:
root@pve2:~# pvecm status
Quorum information
------------------
Date:             Mon Oct 29 12:22:07 2018
Quorum provider:  corosync_votequorum
Nodes:            3
Node ID:          0x00000002
Ring ID:          1/1296
Quorate:          Yes
Votequorum information
----------------------
Expected votes:   3
Highest expected: 3
Total votes:      3
Quorum:           2 
Flags:            Quorate 
Membership information
----------------------
    Nodeid      Votes Name
0x00000001          1 10.29.254.1
0x00000002          1 10.29.254.2 (local)
0x00000003          1 10.29.254.3
root@pve2:~#

I've fixed /etc/hosts, but the info is not updated.
How can I update PVE cluster info to get the private IP instead of the public one ? Should I just reboot the impacted node ?
 
Hi,

you can edit it in the /etc/pve/corosync.conf

if you edit this file dump the config_version
after editing you have to restart all you corosync.services to apply the new config.

see man corosync.conf