[pve-devel] [PATCH docs] Update pvecm doc regarding IP vs hostname as ring address

Stefan Reiter s.reiter at proxmox.com
Mon Jun 17 16:13:47 CEST 2019


Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---

Based on recent conversation in pve-user list.

 pvecm.adoc | 33 +++++++++++++++++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)

diff --git a/pvecm.adoc b/pvecm.adoc
index 61453f7..773c2dd 100644
--- a/pvecm.adoc
+++ b/pvecm.adoc
@@ -149,7 +149,8 @@ Login via `ssh` to the node you want to add.
  hp2# pvecm add IP-ADDRESS-CLUSTER
 ----
 
-For `IP-ADDRESS-CLUSTER` use the IP from an existing cluster node.
+For `IP-ADDRESS-CLUSTER` use the IP or hostname of an existing cluster node.
+An IP address is recommended (see <<ring-node-address-types,Ring Address Types>>).
 
 CAUTION: A new node cannot hold any VMs, because you would get
 conflicts about identical VM IDs. Also, all existing configuration in
@@ -572,7 +573,8 @@ you do not see them already. Those *must* match the node name.
 
 Then replace the address from the 'ring0_addr' properties with the new
 addresses.  You may use plain IP addresses or also hostnames here. If you use
-hostnames ensure that they are resolvable from all nodes.
+hostnames ensure that they are resolvable from all nodes. (see also
+<<ring-node-address-types,Ring Address Types>>)
 
 In my example I want to switch my cluster communication to the 10.10.10.1/25
 network. So I replace all 'ring0_addr' respectively. I also set the bindnetaddr
@@ -654,6 +656,33 @@ systemctl status corosync
 If corosync runs again correct restart corosync also on all other nodes.
 They will then join the cluster membership one by one on the new network.
 
+[[ring-node-address-types]]
+Ring/Node Address Types
+~~~~~~~~~~~~~~~~~~~~~~~
+
+A ring address (sometimes called node address) can be specified in two ways:
+
+* **IPv4/v6 addresses** will be used directly. They are the preferred way of
+setting a node's address, since they are static.
+
+* **Hostnames** will be resolved using `getaddrinfo`, which means that IPv6
+addresses will always be used first, if available (see also `man gai.conf`).
+
+NOTE: Since {pve} 5.1, while supported, hostnames will never be configured by
+integrated tooling. Instead, they will be resolved at the time of entry. The
+internal order of preferring IPv6 over v4 still applies, however.
+
+In the `corosync.conf` file, if nodes in the `nodelist` section have their
+`ringX_addr` specified as a hostname (either by manually <<edit-corosync-conf,editing the corosync.conf file>>
+or by upgrading from older {pve} versions), you need to make sure that every
+node in the cluster can resolve each hostname correctly. Once again, keep in
+mind that IPv6 will always be resolved first.
+
+If your setup uses hostnames in `corosync.conf`, it might be a good idea to
+either replace them with IPs, or at least check the file and cluster for
+correctness after major upgrades. Given the dynamic nature of hostname
+resolving, this configuration can easily lead to unwanted behaviour.
+
 [[pvecm_rrp]]
 Redundant Ring Protocol
 ~~~~~~~~~~~~~~~~~~~~~~~
-- 
2.20.1





More information about the pve-devel mailing list