[pve-devel] [PATCH cluster 6/8] pvecm addnode: ensure ring1_addr is set if ring 1 is configured

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Feb 22 16:59:09 CET 2017


Else the joining node will not be able to work correctly.
Also improve the respective error messages.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 data/PVE/CLI/pvecm.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/data/PVE/CLI/pvecm.pm b/data/PVE/CLI/pvecm.pm
index 1c5d863..e4de650 100755
--- a/data/PVE/CLI/pvecm.pm
+++ b/data/PVE/CLI/pvecm.pm
@@ -334,9 +334,12 @@ __PACKAGE__->register_method ({
 
 	$param->{ring0_addr} = $name if !$param->{ring0_addr};
 
-	die " ring1_addr needs a configured ring 1 interface!\n"
+	die "corosync: using 'ring1_addr' parameter needs a configured ring 1 interface!\n"
 	    if $param->{ring1_addr} && !defined($totem_cfg->{interface}->{1});
 
+	die "corosync: ring 1 interface configured but 'ring1_addr' parameter not defined!\n"
+	    if defined($totem_cfg->{interface}->{1}) && !defined($param->{ring1_addr});
+
 	if (defined(my $res = $nodelist->{$name})) {
 	    $param->{nodeid} = $res->{nodeid} if !$param->{nodeid};
 	    $param->{votes} = $res->{quorum_votes} if !defined($param->{votes});
-- 
2.1.4





More information about the pve-devel mailing list