Ok ok, I just say that's unusable in production environment.
Hi spirit, thank you for your how-to, but I don't think it can work.
When you run "pvecm add ipofnode1 -force" on a non-rebooted node, it will fail because it calls 'systemctl stop pve-cluster' and systemctl does not work yet (system not rebooted) :
Code:pvecm add 192.168.0.203 -force node test2 already defined copy corosync auth key stopping pve-cluster service Failed to get D-Bus connection: Unknown error -1 can't stop pve-cluster service
yes, but the main part (copy corosync conf is done just before)
Code:
print "copy corosync auth key\n";
$cmd = ['rsync', '--rsh=ssh -l root -o BatchMode=yes', '-lpgoq',
"[$host]:$authfile $clusterconf", $tmpdir];
system(@$cmd) == 0 || die "can't rsync data from host '$host'\n";
mkdir "/etc/corosync";
my $confbase = basename($clusterconf);
$cmd = "cp '$tmpdir/$confbase' '/etc/corosync/$confbase'";
system($cmd) == 0 || die "can't copy cluster configuration\n";
my $keybase = basename($authfile);
system ("cp '$tmpdir/$keybase' '$authfile'") == 0 ||
die "can't copy '$tmpdir/$keybase' to '$authfile'\n";
print "stopping pve-cluster service\n";
system("umount $basedir -f >/dev/null 2>&1");
system("systemctl stop pve-cluster") == 0 ||
die "can't stop pve-cluster service\n";
That's why I shutdown pve-cluster and corosync manually just after
Code:
# killall -9 corosync
# /etc/init.d/pve-cluster stop