[pve-devel] [PATCHV2 pve-cluster 2/2] reload corosync.conf after removing a node.
Wolfgang Link
w.link at proxmox.com
Tue Sep 6 11:43:58 CEST 2016
---
data/PVE/CLI/pvecm.pm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/data/PVE/CLI/pvecm.pm b/data/PVE/CLI/pvecm.pm
index d673929..e607c66 100755
--- a/data/PVE/CLI/pvecm.pm
+++ b/data/PVE/CLI/pvecm.pm
@@ -410,6 +410,7 @@ __PACKAGE__->register_method ({
my $nodelist = corosync_nodelist($conf);
my $node;
+ my $nodeid;
foreach my $tmp_node (keys %$nodelist) {
@@ -418,6 +419,7 @@ __PACKAGE__->register_method ({
|| (defined($nodelist->{$tmp_node}->{ring1_addr})
&& $nodelist->{$tmp_node}->{ring1_addr} eq $param->{node})) {
$node = $tmp_node;
+ $nodeid = $nodelist->{$tmp_node}->{nodeid};
last;
}
}
@@ -429,6 +431,10 @@ __PACKAGE__->register_method ({
corosync_update_nodelist($conf, $nodelist);
+ if(defined($nodeid)) {
+ PVE::Tools::run_command(['corosync-cfgtool','-k', $nodeid]);
+ }
+
return undef;
}});
--
2.1.4
More information about the pve-devel
mailing list