From 8b3d472b9cbec61a48041ce2032ce093bb722407 Mon Sep 17 00:00:00 2001 From: digimer Date: Mon, 24 Jul 2023 19:00:19 -0400 Subject: [PATCH] Updated striker-update-cluster to set primary_host_uuid to node 1 if not returned from Cluster->get_primary_host_uuid. Signed-off-by: digimer --- tools/striker-update-cluster | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/striker-update-cluster b/tools/striker-update-cluster index 47c74165..8a29fefc 100755 --- a/tools/striker-update-cluster +++ b/tools/striker-update-cluster @@ -205,6 +205,7 @@ sub update_nodes my $anvil_node1_host_uuid = $anvil->data->{anvils}{anvil_uuid}{$anvil_uuid}{anvil_node1_host_uuid}; my $anvil_node2_host_uuid = $anvil->data->{anvils}{anvil_uuid}{$anvil_uuid}{anvil_node2_host_uuid}; my $primary_host_uuid = $anvil->Cluster->get_primary_host_uuid({anvil_uuid => $anvil_uuid}); + $primary_host_uuid = $anvil_node1_host_uuid if not $primary_host_uuid; my $secondary_host_uuid = $primary_host_uuid eq $anvil_node1_host_uuid ? $anvil_node2_host_uuid : $anvil_node1_host_uuid; my $node1_short_host_name = $anvil->data->{hosts}{host_uuid}{$anvil_node1_host_uuid}{short_host_name}; my $node2_short_host_name = $anvil->data->{hosts}{host_uuid}{$anvil_node2_host_uuid}{short_host_name};