Skip to content

Commit

Permalink
remove unhealthy Arc cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu authored and Ubuntu committed Aug 5, 2024
1 parent 92101a9 commit 87bfd57
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions infra/bootstrapping/sdk_helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,14 @@ function ensure_k8s_compute(){
fi
fi

# Remove Arc if unhealthy
clusterState=$(az connectedk8s show --resource-group "${RESOURCE_GROUP_NAME}" --name "${arc_compute}-arc" --query connectivityStatus -o tsv)
echo_info "Cluster: ${arc_compute}-arc current state: ${clusterState}"
if [[ "${clusterState}" != "Connected" ]]; then
echo_info "Remove unhealthy ARC: '${arc_compute}-arc'"
az connectedk8s delete --resource-group "${RESOURCE_GROUP_NAME}" --name "${arc_compute}-arc" --yes
fi

# Remove k8s compute if unhealthy
Status=$(az ml compute show --resource-group "${RESOURCE_GROUP_NAME}" --name "${ARC_COMPUTE_NAME}" --query provisioning_state --output tsv)
if
Expand Down

0 comments on commit 87bfd57

Please sign in to comment.