]> git.proxmox.com Git - pve-cluster.git/blobdiff - data/PVE/CLI/pvecm.pm
Add verification and fallback to cluster join/addnode
[pve-cluster.git] / data / PVE / CLI / pvecm.pm
index df0b1b9ea3a788937db4a5b9a8dc4b2921417ce5..a838ff2c620a53f8199521689c5dbd3ee0b44d29 100755 (executable)
@@ -401,6 +401,13 @@ __PACKAGE__->register_method ({
                    $links->{$link}, get_standard_option('corosync-link'));
            }
 
+           # this will be used as fallback if no links are specified
+           if (!%$links) {
+               push @$cmd, '--link0', $local_ip_address;
+               print "No cluster network links passed explicitly, fallback to local node"
+                   . " IP '$local_ip_address'\n";
+           }
+
            if (system (@$cmd) != 0) {
                my $cmdtxt = join (' ', @$cmd);
                die "unable to add node: command failed ($cmdtxt)\n";