[pve-devel] [PATCH cluster v5 02/17] tell cluster log when adding/deleting a node

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Jan 26 14:25:12 CET 2018


Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 data/PVE/API2/ClusterConfig.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/data/PVE/API2/ClusterConfig.pm b/data/PVE/API2/ClusterConfig.pm
index 52c6e50..76fe7b6 100644
--- a/data/PVE/API2/ClusterConfig.pm
+++ b/data/PVE/API2/ClusterConfig.pm
@@ -216,6 +216,8 @@ __PACKAGE__->register_method ({
 	    $nodelist->{$name}->{ring1_addr} = $param->{ring1_addr} if $param->{ring1_addr};
 	    $nodelist->{$name}->{quorum_votes} = $param->{votes} if $param->{votes};
 
+	    PVE::Cluster::log_msg('notice', 'root at pam', "adding node $name to cluster");
+
 	    PVE::Corosync::update_nodelist($conf, $nodelist);
 	};
 
@@ -270,6 +272,8 @@ __PACKAGE__->register_method ({
 	    die "Node/IP: $param->{node} is not a known host of the cluster.\n"
 		if !defined($node);
 
+	    PVE::Cluster::log_msg('notice', 'root at pam', "deleting node $node from cluster");
+
 	    delete $nodelist->{$node};
 
 	    PVE::Corosync::update_nodelist($conf, $nodelist);
-- 
2.14.2





More information about the pve-devel mailing list