]> git.proxmox.com Git - pve-cluster.git/blobdiff - data/PVE/Cluster/Setup.pm
Add verification and fallback to cluster join/addnode
[pve-cluster.git] / data / PVE / Cluster / Setup.pm
index 88e168095767354d979260dc4d80eb52211ad54f..27e240375f3236243c8d7b2d26bc6f1e241fdfc4 100644 (file)
@@ -684,6 +684,13 @@ sub join {
        $args->{"link$link"} = PVE::Corosync::print_corosync_link($links->{$link});
     }
 
+    # this will be used as fallback if no links are specified
+    if (!%$links) {
+       $args->{link0} = $local_ip_address;
+       print "No cluster network links passed explicitly, fallback to local node"
+           . " IP '$local_ip_address'\n";
+    }
+
     print "Request addition of this node\n";
     my $res = eval { $conn->post("/cluster/config/nodes/$nodename", $args); };
     if (my $err = $@) {