Skip to content

Commit 735144d

Browse files
zetiaatgithubUbuntu
and
Ubuntu
authored
detach compute before attaching, as k8s compute doesn't support update (Azure#3030)
* detach compute before attaching * fix typo * refine log --------- Co-authored-by: Ubuntu <zetia@DevBox-zetia.1jltvvkrfgyuhl3llhmbyldkog.bx.internal.cloudapp.net>
1 parent 0c60cd5 commit 735144d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

infra/bootstrapping/sdk_helpers.sh

+3
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,9 @@ function setup_compute() {
494494
then
495495
echo_info "Cluster is already attached to workspace for the cluster: ${CLUSTER_NAME} as ${COMPUTE_NAME} in workspace:${WORKSPACE_NAME} under namespace: ${COMPUTE_NS}..."
496496
else
497+
echo_info "Detach compute ${COMPUTE_NAME} in workspace:${WORKSPACE_NAME} first, as k8s compute doesn't support update"
498+
az ml compute detach --subscription "${SUBSCRIPTION_ID}" --resource-group "${RESOURCE_GROUP_NAME}" --workspace-name "${WORKSPACE_NAME}" --name "${COMPUTE_NAME}" -y || true
499+
497500
echo_info "Attaching compute to workspace for the cluster: ${CLUSTER_NAME} as ${COMPUTE_NAME} in workspace:${WORKSPACE_NAME} under namespace: ${COMPUTE_NS}"
498501
ATTACH_COMPUTE=$(az ml compute attach \
499502
--subscription "${SUBSCRIPTION_ID}" \

0 commit comments

Comments
 (0)