[pve-devel] [PATCH cluster] fix #1743: cluster create: default to ring0_addr for bindnet0

Thomas Lamprecht t.lamprecht at proxmox.com
Wed May 2 10:02:57 CEST 2018


Else, if a separate network address was passed for ring0_addr but no
bindnet0 adress was set we used the wrong fallback.
Do not fallback to $local_node_ip but always to $ring0_addr, which
itself falls back to local node IP.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 data/PVE/Corosync.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data/PVE/Corosync.pm b/data/PVE/Corosync.pm
index 35af087..560a498 100644
--- a/data/PVE/Corosync.pm
+++ b/data/PVE/Corosync.pm
@@ -193,7 +193,7 @@ sub create_conf {
 
     my $local_ip_address = PVE::Cluster::remote_node_ip($nodename);
     my $ring0_addr = $param{ring0_addr} // $local_ip_address;
-    my $bindnet0_addr = $param{bindnet0_addr} // $local_ip_address;
+    my $bindnet0_addr = $param{bindnet0_addr} // $ring0_addr;
 
     my $use_ipv6 = ip_is_ipv6($ring0_addr);
     die "ring 0 addresses must be from same IP family!\n"
-- 
2.14.2




More information about the pve-devel mailing list