-
Notifications
You must be signed in to change notification settings - Fork 2.4k
OCPBUGS-84114: Add hypershift-openstack-gather step #80419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
openshift-merge-bot
merged 2 commits into
openshift:main
from
shiftstack:fix-hypershift-gate
Jun 12, 2026
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| approvers: | ||
| - openstack-approvers | ||
| reviewers: | ||
| - openstack-reviewers |
57 changes: 57 additions & 0 deletions
57
...perator/step-registry/hypershift/openstack/gather/hypershift-openstack-gather-commands.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| if [[ -z "${KUBECONFIG:-}" || ! -f "${KUBECONFIG}" ]]; then | ||
| echo "No kubeconfig found at ${KUBECONFIG:-<unset>}, skipping gather" | ||
| exit 0 | ||
| fi | ||
|
|
||
| GATHER_DIR="${ARTIFACT_DIR}/capo-gather" | ||
| mkdir -p "${GATHER_DIR}" | ||
|
|
||
| echo "Gathering CAPO and ORC resources from management cluster..." | ||
|
|
||
| # Namespaces stuck in Terminating — these are the first sign of a stuck deletion. | ||
| echo "=== Namespaces in Terminating state ===" | ||
| oc get namespace --field-selector='status.phase=Terminating' -o yaml 2>/dev/null \ | ||
| > "${GATHER_DIR}/terminating-namespaces.yaml" || true | ||
| oc get namespace --field-selector='status.phase=Terminating' 2>/dev/null || true | ||
|
|
||
| # HostedClusters and NodePools for context. | ||
| for resource in hostedclusters nodepools; do | ||
| echo "=== ${resource} ===" | ||
| oc get "${resource}" -A -o yaml 2>/dev/null \ | ||
| > "${GATHER_DIR}/${resource}.yaml" || true | ||
| done | ||
|
|
||
| # CAPI core resources (Cluster, Machine) to trace the deletion chain. | ||
| for resource in \ | ||
| "clusters.cluster.x-k8s.io" \ | ||
| "machines.cluster.x-k8s.io"; do | ||
| echo "=== ${resource} ===" | ||
| name="${resource%%.*}" | ||
| oc get "${resource}" -A -o yaml 2>/dev/null \ | ||
| > "${GATHER_DIR}/${name}.yaml" || true | ||
| done | ||
|
|
||
| # CAPO-specific resources. OpenStackServer carries the CAPO-managed finalizer | ||
| # (openstackserver.infrastructure.cluster.x-k8s.io) that can get permanently | ||
| # stuck if the CAPO pod is killed before the finalizer is removed. | ||
| for resource in \ | ||
| "openstackclusters.infrastructure.cluster.x-k8s.io" \ | ||
| "openstackmachines.infrastructure.cluster.x-k8s.io" \ | ||
| "openstackservers.infrastructure.cluster.x-k8s.io"; do | ||
| echo "=== ${resource} ===" | ||
| name="${resource%%.*}" | ||
| oc get "${resource}" -A -o yaml 2>/dev/null \ | ||
| > "${GATHER_DIR}/${name}.yaml" || true | ||
| done | ||
|
|
||
| # ORC Image resources. These also carry an in-namespace finalizer (managed by | ||
| # the ORC controller) that can block namespace termination. | ||
| echo "=== images.openstack.k-orc.cloud ===" | ||
| oc get images.openstack.k-orc.cloud -A -o yaml 2>/dev/null \ | ||
| > "${GATHER_DIR}/orc-images.yaml" || true | ||
|
|
||
| echo "Done gathering CAPO resources" |
11 changes: 11 additions & 0 deletions
11
...r/step-registry/hypershift/openstack/gather/hypershift-openstack-gather-ref.metadata.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "path": "hypershift/openstack/gather/hypershift-openstack-gather-ref.yaml", | ||
| "owners": { | ||
| "approvers": [ | ||
| "openstack-approvers" | ||
| ], | ||
| "reviewers": [ | ||
| "openstack-reviewers" | ||
| ] | ||
| } | ||
| } |
17 changes: 17 additions & 0 deletions
17
ci-operator/step-registry/hypershift/openstack/gather/hypershift-openstack-gather-ref.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| ref: | ||
| as: hypershift-openstack-gather | ||
| best_effort: true | ||
| cli: latest | ||
| commands: hypershift-openstack-gather-commands.sh | ||
| from: upi-installer | ||
| optional_on_success: true | ||
| resources: | ||
| requests: | ||
| cpu: 10m | ||
| memory: 100Mi | ||
| timeout: 5m0s | ||
| documentation: |- | ||
| Gather CAPO (OpenStackServer, OpenStackMachine, OpenStackCluster) and ORC | ||
| Image resources from the management cluster. Runs after e2e test failures to | ||
| capture the state of any objects whose finalizers may have blocked namespace | ||
| termination and caused the test to time out. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.