From 2333002de08e2164012a9d24159f60c2b3d47e2f Mon Sep 17 00:00:00 2001 From: dackbusch <47158989+dackbusch@users.noreply.github.com> Date: Mon, 29 Apr 2024 09:28:58 -0700 Subject: [PATCH] Support quorum formation 6.2.1 onward, update software upgrade order and timeout (#46) --- modules/qprovisioner/functions/upgrade-order.txt | 2 +- modules/qprovisioner/scripts/provision.sh | 8 +++++++- modules/qprovisioner/scripts/status.ps1 | 2 +- modules/qprovisioner/scripts/status.sh | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/qprovisioner/functions/upgrade-order.txt b/modules/qprovisioner/functions/upgrade-order.txt index 6bf46e8..c51996a 100755 --- a/modules/qprovisioner/functions/upgrade-order.txt +++ b/modules/qprovisioner/functions/upgrade-order.txt @@ -1 +1 @@ -4.1.0.1, 4.2.0, 4.3.0, 5.0.0.1, 5.1.0.1, 5.2.0.2, 5.3.0, 6.0.0.2, 6.1.0, 6.2.0, 6.3.0 \ No newline at end of file +4.1.0.1, 4.2.0, 4.3.0, 5.0.0.1, 5.1.0.1, 5.2.0.2, 5.3.0, 6.0.0.2, 6.1.0.3, 6.2.0.1, 6.3.0.1, 7.0.0.1, 7.1.0, 7.2.0, 7.3.0 \ No newline at end of file diff --git a/modules/qprovisioner/scripts/provision.sh b/modules/qprovisioner/scripts/provision.sh index fff1117..ba6a2e8 100755 --- a/modules/qprovisioner/scripts/provision.sh +++ b/modules/qprovisioner/scripts/provision.sh @@ -348,7 +348,13 @@ elif [ "$add_nodes" == "true" ]; then $qqh network_mod_network --network-id 1 --floating-ip-ranges $halfFloatIPs fi - $qqh add_nodes --node-ips ${upgradeIPs[@]} + chk6=$(vercomp $cur_ver "6.1.2"; echo $?) + if [ $chk6 -eq 1 ]; then + $qqh add_nodes --node-ips ${upgradeIPs[@]} + else + $qqh add_nodes --node-ips ${upgradeIPs[@]} --batch + fi + until ./qq --host ${upgradeIPs[0]} node_state_get | grep -q "ACTIVE"; do sleep 5 echo "Waiting for Quorum" diff --git a/modules/qprovisioner/scripts/status.ps1 b/modules/qprovisioner/scripts/status.ps1 index 4ed3600..a2207f6 100644 --- a/modules/qprovisioner/scripts/status.ps1 +++ b/modules/qprovisioner/scripts/status.ps1 @@ -10,7 +10,7 @@ $status=aws ssm get-parameter --region ${aws_region} --output text --name "/qumulo/${deployment_unique_name}/last-run-status" --query "Parameter.Value" Write-Host $status $maxtime = $maxtime + 10 - if ($maxtime -gt 900) { + if ($maxtime -gt 2400) { Write-Host "****************Cluster Provisioning FAILED****************" Write-Host "AWS Parameter Store /qumulo/${deployment_unique_name}/last-run-status to see what stage it failed at. You may resolve the issue and manually restart it." Write-Host "For more detailed analysis review the AWS provisioning instance ${aws_instance_id} log to troubleshoot" diff --git a/modules/qprovisioner/scripts/status.sh b/modules/qprovisioner/scripts/status.sh index 44edaac..7c816ed 100644 --- a/modules/qprovisioner/scripts/status.sh +++ b/modules/qprovisioner/scripts/status.sh @@ -11,7 +11,7 @@ while [ "$status" != "Shutting down provisioning instance" ]; do status=$(aws ssm get-parameter --region ${aws_region} --output text --name "/qumulo/${deployment_unique_name}/last-run-status" --query "Parameter.Value") echo $status maxtime=$(( $maxtime + 10 )) - if [ $maxtime -gt 900 ]; then + if [ $maxtime -gt 2400 ]; then echo "****************Cluster Provisioning FAILED****************" echo "AWS Parameter Store /qumulo/${deployment_unique_name}/last-run-status to see what stage it failed at. You may resolve the issue and manually restart it." echo "For more detailed analysis review the AWS provisioning instance ${aws_instance_id} log to troubleshoot"