Contact IP of others nodes

simplerezo

Member
Apr 26, 2022
16
0
6
PARIS
www.simplerezo.com
Hi !

We have a cluster of 2 nodes, with a public IP on each, but also a private VLAN between the nodes.

I have been able to successfully setup replication/migration to use private IPs for transfer (setting "migration network" in datacenter.cfg).

But when I use the shell button to connect to the other node, it using public IP, despite node IPs are the private ones (as defined in corosync.conf).

How can I setup Proxmox to only use private IPs ?

--
Clement
 
After adding some restrictions for SSH server, my replication is also failing, because nodes trying to contact each other by public IP:
Bash:
command '/usr/bin/ssh -e none -o 'BatchMode=yes' -o 'HostKeyAlias=<NODE>' root@<PUBLIC> pvecm mtunnel -migration_network 172.16.32.0/24 -get_migration_ip' failed: exit code 255
As you can see, my migration network is well defined.

pvecm status is also showing private IPs:
Code:
[...]
Membership information
----------------------
    Nodeid      Votes Name
0x00000001          1 172.16.32.2 (local)
0x00000002          1 172.16.32.1

corosync.conf:
Code:
[...]
nodelist {
  node {
    name: <NODE1>
    nodeid: 1
    quorum_votes: 1
    ring0_addr: 172.16.32.2
  }
  node {
    name: <NODE2>
    nodeid: 2
    quorum_votes: 1
    ring0_addr: 172.16.32.1
  }
}
[...]

So why proxmox is still trying to contact nodes by public IP and how to change this ?
 
regular communication (including retrieving which IPs each node has in other networks, like a configured migration network) takes place over the IPs that each node's hostname resolves to (on each node!). this is completely independent of the IPs/network that corosync is configured to use.
 
After restart:
- shell connection to other node is still made through public IP
- replication is still failing because ssh initial connection is made through public IP

To be sure about my /etc/hosts file I tried to ping the other node, and ping is going - and answering - through private IP.
 
yeah, each host uses its own /etc/hosts file (or if no entry is there, DNS as configured). so you need to ensure all nodes are correctly resolved on each node.