]> git.proxmox.com Git - pve-cluster.git/commitdiff
api/join: avoid using an IPv6 address as worker task ID
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 30 Jul 2018 12:31:00 +0000 (14:31 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 31 Jul 2018 06:23:54 +0000 (08:23 +0200)
We used the hostname of the node over which we joined a cluster as
worker ID, which is then encoded in it's task UPID - a unique ID with
encoded information, separated by colons.
While this is no problem for normal hostnames, or IPv4 addresses, the
hostname can also be an IPv6 address - which is also separated by
colons. This throws of the upid_decode method.

While the, from a user POV, best solution would probably be to
connect and query the cluster name from the join peer it is much
simpler to just omit the ID to avoid such problems.

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

index 0534e6aeed52306035136fe6ddc25fd4f64062d0..9ea0341a702fe0cddef674e484e03b9108e8596e 100644 (file)
@@ -521,7 +521,7 @@ __PACKAGE__->register_method ({
            die $@ if $@;
        };
 
-       return $rpcenv->fork_worker('clusterjoin', $param->{hostname},  $authuser, $worker);
+       return $rpcenv->fork_worker('clusterjoin', undef,  $authuser, $worker);
     }});