From 863a7b1b07caeaacfa46b5b96657eba1ffcad54f Mon Sep 17 00:00:00 2001 From: digimer Date: Wed, 10 Apr 2024 17:10:52 -0400 Subject: [PATCH] Added missing data being recorded in crm_mon parser Signed-off-by: digimer --- Anvil/Tools/Cluster.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Anvil/Tools/Cluster.pm b/Anvil/Tools/Cluster.pm index 6a3a639d..c3e6d586 100644 --- a/Anvil/Tools/Cluster.pm +++ b/Anvil/Tools/Cluster.pm @@ -353,6 +353,10 @@ sub add_server return_code => $return_code, }}); + # Log the contents of the PCS file + my $pcs_body = $anvil->Storage->read_file({debug => $debug, file => $pcs_file}); + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { pcs_body => $pcs_body }}); + # Commit my $commit_command = $anvil->data->{path}{exe}{pcs}." cluster cib-push ".$pcs_file; $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { commit_command => $commit_command }}); @@ -1090,7 +1094,6 @@ sub check_stonith_config $check_ipmi_config = 0; $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { check_ipmi_config => $check_ipmi_config }}); } - } if ($check_ipmi_config) { @@ -4226,6 +4229,10 @@ sub parse_crm_mon stonith_name => $stonith_name, resource_key => $resource_key, }}); + $anvil->data->{crm_mon}{parsed}{'pacemaker-result'}{resources}{$resource_key}{$id}{variables}{resource_agent} = $stonith_name; + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { + "crm_mon::parsed::pacemaker-result::resources::${resource_key}::${id}::variables::resource_agent" => $anvil->data->{crm_mon}{parsed}{'pacemaker-result'}{resources}{$resource_key}{$id}{variables}{resource_agent}, + }}); } } if (($id) && ($resource_agent))