From bb8583d042779883a592a54842b9ed5bc58f58ec Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 22 Feb 2017 16:59:09 +0100 Subject: [PATCH] pvecm addnode: ensure ring1_addr is set if ring 1 is configured Else the joining node will not be able to work correctly. Also improve the respective error messages. Signed-off-by: Thomas Lamprecht --- 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.39.2