]> git.proxmox.com Git - pve-cluster.git/commitdiff
pvecm addnode: ensure ring1_addr is set if ring 1 is configured
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 22 Feb 2017 15:59:09 +0000 (16:59 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 28 Feb 2017 10:50:01 +0000 (11:50 +0100)
Else the joining node will not be able to work correctly.
Also improve the respective error messages.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
data/PVE/CLI/pvecm.pm

index 1c5d863d5757d6054a73c7c53555ed35a9014804..e4de650b6d8591a945797e062bcc58ea4e4687eb 100755 (executable)
@@ -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});