From 336699a0f20927a6211a2085ad13611c22a146f7 Mon Sep 17 00:00:00 2001 From: digimer Date: Wed, 21 Jun 2023 10:29:44 -0400 Subject: [PATCH] Added logging to help debug a DRBD resource config issue related to finding matching SN IPs. Signed-off-by: digimer --- tools/anvil-provision-server | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tools/anvil-provision-server b/tools/anvil-provision-server index e18d1a80..dc9e9143 100755 --- a/tools/anvil-provision-server +++ b/tools/anvil-provision-server @@ -1208,14 +1208,24 @@ sub get_sn_details $anvil->data->{job}{node1_sn_ip} = ""; $anvil->data->{job}{node2_sn_ip} = ""; $anvil->data->{job}{sn_network} = ""; - $anvil->Network->load_ips({host => $anvil->data->{job}{node1_short_host_name}, host_uuid => $anvil->data->{job}{node1_host_uuid}}); - $anvil->Network->load_ips({host => $anvil->data->{job}{node2_short_host_name}, host_uuid => $anvil->data->{job}{node2_host_uuid}}); + $anvil->Network->load_ips({ + debug => 2, + host => $anvil->data->{job}{node1_short_host_name}, + host_uuid => $anvil->data->{job}{node1_host_uuid}, + }); + $anvil->Network->load_ips({ + debug => 2, + host => $anvil->data->{job}{node2_short_host_name}, + host_uuid => $anvil->data->{job}{node2_host_uuid}, + }); my $match = $anvil->Network->find_matches({ + debug => 2, first => $anvil->data->{job}{node1_short_host_name}, second => $anvil->data->{job}{node2_short_host_name}, source => $THIS_FILE, line => __LINE__, }); + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { match => $match }}); $anvil->data->{job}{sn_network} = ""; $anvil->data->{job}{node1_sn_ip} = ""; @@ -1226,6 +1236,7 @@ sub get_sn_details $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { matched_ips => $matched_ips }}); foreach my $interface (sort {$a cmp $b} keys %{$match->{$node1_short_host_name}}) { + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { interface => $interface }}); if ($interface =~ /sn/) { ### TODO: This always chooses SN1 at this time, we need to support (later) VM