fix(hypershift/gcp): handle missing hosted-cluster-name in deprovision#76930
Conversation
Follow-up to GCP-484. When a job is aborted after gke-provision but before hosted-cluster-setup, the deprovision script crashes reading the missing hosted-cluster-name file, leaving GCP projects orphaned. Make hosted-cluster-name optional and skip DNS cleanup when it is absent — no hosted clusters means no DNS records to clean up. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Skipping CI for Draft Pull Request. |
|
[REHEARSALNOTIFIER]
Prior to this PR being merged, you will need to either run and acknowledge or opt to skip these rehearsals. Interacting with pj-rehearseComment: Once you are satisfied with the results of the rehearsals, comment: |
|
/pj-rehearse pull-ci-openshift-hypershift-main-e2e-gke |
|
@cristianoveiga: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
Note: The Root cause: Why it fails now: hypershift#7887 added a Fix: hypershift#7824 (GCP-431: Add CNCC support for GCP WIF) adds the missing secret for GCP but is not yet merged. The e2e-gke job will fail until that lands. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cristianoveiga, patjlm The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/pj-rehearse ack |
|
@cristianoveiga: now processing your pj-rehearse request. Please allow up to 10 minutes for jobs to trigger or cancel. |
|
@cristianoveiga: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
3979293
into
openshift:main
openshift#76930) Follow-up to GCP-484. When a job is aborted after gke-provision but before hosted-cluster-setup, the deprovision script crashes reading the missing hosted-cluster-name file, leaving GCP projects orphaned. Make hosted-cluster-name optional and skip DNS cleanup when it is absent — no hosted clusters means no DNS records to clean up. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
openshift#76930) Follow-up to GCP-484. When a job is aborted after gke-provision but before hosted-cluster-setup, the deprovision script crashes reading the missing hosted-cluster-name file, leaving GCP projects orphaned. Make hosted-cluster-name optional and skip DNS cleanup when it is absent — no hosted clusters means no DNS records to clean up. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Summary
gke-provisionbut beforehosted-cluster-setup, the deprovision script crashes reading the missinghosted-cluster-namefile (set -euo pipefail), preventing all cleanup — GKE cluster, HC project, CP project, DNS records, and WIF bindings are all orphaned.hosted-cluster-nameso deprovision can still clean up GCP projects and GKE clusters when the job is aborted beforehosted-cluster-setupruns. DNS cleanup is skipped in this case since no hosted clusters were created and no DNS records exist.Test plan
hosted-cluster-nameis missing (abort scenario)hosted-cluster-nameexists (normal scenario)🤖 Generated with Claude Code