Any objections? Else I'd apply this later today myself...
It syncs the behaviour from SSH join with API join and create,
so it isn't new untested code.
Am 03/29/2018 um 11:06 AM schrieb Thomas Lamprecht:
We already switched to this behaviour in pvecm create and pvecm join
(with API) but did not changed it for the case when a user requested
to use the old method to join with --use_ssh.
Signed-off-by: Thomas Lamprecht <[email protected]>
---
data/PVE/CLI/pvecm.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/data/PVE/CLI/pvecm.pm b/data/PVE/CLI/pvecm.pm
index 7e16586..23a15a9 100755
--- a/data/PVE/CLI/pvecm.pm
+++ b/data/PVE/CLI/pvecm.pm
@@ -107,6 +107,7 @@ __PACKAGE__->register_method ({
my $nodename = PVE::INotify::nodename();
my $host = $param->{hostname};
+ my $local_ip_address = remote_node_ip($nodename);
PVE::Cluster::assert_joinable($param->{ring0_addr}, $param->{ring1_addr}, $param->{force});
@@ -150,7 +151,7 @@ __PACKAGE__->register_method ({
push @$cmd, '--nodeid', $param->{nodeid} if $param->{nodeid};
push @$cmd, '--votes', $param->{votes} if defined($param->{votes});
- push @$cmd, '--ring0_addr', $param->{ring0_addr} if
defined($param->{ring0_addr});
+ push @$cmd, '--ring0_addr', $param->{ring0_addr} //
$local_ip_address;
push @$cmd, '--ring1_addr', $param->{ring1_addr} if
defined($param->{ring1_addr});
if (system (@$cmd) != 0) {
_______________________________________________
pve-devel mailing list
[email protected]
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel