Skip to content

[shiftstack] Bound soft-transient oc exec retries during pod polling - #4192

Open
tusharjadhav3302 wants to merge 1 commit into
openstack-k8s-operators:mainfrom
tusharjadhav3302:fix/shiftstack-exec-soft-transient-budget
Open

tusharjadhav3302 wants to merge 1 commit into
openstack-k8s-operators:mainfrom
tusharjadhav3302:fix/shiftstack-exec-soft-transient-budget

Conversation

@tusharjadhav3302

Copy link
Copy Markdown
Contributor

Summary

  • Add a short consecutive-failure budget for soft-transient oc exec errors (connection refused, i/o timeout) while polling long-running shiftstack tests in shiftstackclient.
  • Keeps the PR Retry transient oc exec errors during shiftstack pod polling #4150 behavior for hard-transient errors (SCC / InternalError / stream reset): those still retry for the full poll window.
  • Avoids failing on a brief management-API VIP blip (observed on serval70 ocp4.23 when cifmw-dnsmasq restarted mid-test) without spinning for ~8h when the API is truly unreachable.

Why

On shiftstack-rhel9-rhoso18.0-ocp4.23 (serval70, 2026-09-17) the outer poller failed immediately on:

The connection to the server api.ocp.openstack.lab:6443 was refused

The background osp_verification_4.23_nightly run continued and completed afterward. Re-adding connection refused to the unlimited hard-transient list was deliberately rejected in #4150 review; this change uses a bounded soft budget instead (default 12 × 5s ≈ 60s).

Test plan

  • ci-framework checks / molecule shiftstack
  • Confirm a single connection refused during polling no longer fails the testconfig
  • Confirm 12 consecutive soft-transient failures still fail promptly with the new message
  • Confirm SCCExecRestrictions / Internal error still retry for the full window

Made with Cursor

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@openshift-ci

openshift-ci Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign imatza-rh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci

openshift-ci Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Hi @tusharjadhav3302. Thanks for your PR.

I'm waiting for a openstack-k8s-operators member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@brjackma

Copy link
Copy Markdown
Contributor

/ok-to-test

@tusharjadhav3302
tusharjadhav3302 force-pushed the fix/shiftstack-exec-soft-transient-budget branch from 84b7935 to 7139f5d Compare September 18, 2026 14:26
@centosinfra-prod-github-app

Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/7752626782184cd6a2414e6e8400a27f

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 08m 56s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 20m 26s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 34m 51s
cifmw-crc-podified-edpm-baremetal-minor-update NODE_FAILURE Node(set) request 099-0000207282 failed in 0s
✔️ cifmw-pod-zuul-files SUCCESS in 4m 20s
✔️ openstack-k8s-operators-content-provider-bootc SUCCESS in 3h 59m 52s
✔️ cifmw-crc-podified-edpm-baremetal-bootc SUCCESS in 1h 36m 26s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 26s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 31s
✔️ cifmw-molecule-shiftstack SUCCESS in 24m 19s

@brjackma

Copy link
Copy Markdown
Contributor

recheck

@centosinfra-prod-github-app

Copy link
Copy Markdown

Build succeeded (check pipeline).
https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/b3eb6f60dd1e4faa809e39fc556a34f0

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 16m 07s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 22m 25s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 32m 24s
✔️ cifmw-crc-podified-edpm-baremetal-minor-update SUCCESS in 1h 56m 12s
✔️ cifmw-pod-zuul-files SUCCESS in 4m 26s
✔️ openstack-k8s-operators-content-provider-bootc SUCCESS in 2h 38m 02s
✔️ cifmw-crc-podified-edpm-baremetal-bootc SUCCESS in 1h 25m 52s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 33s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 11s
✔️ cifmw-molecule-shiftstack SUCCESS in 24m 12s

brjackma
brjackma previously approved these changes Sep 21, 2026
@Valkyrie00

Copy link
Copy Markdown
Contributor

/agentic_review

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can add REVIEW.md to your repo root and Qodo follows it on every PR

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

vars:
_hard_transient_re: "{{ cifmw_shiftstack_exec_transient_patterns | join('|') }}"
_soft_transient_re: "{{ cifmw_shiftstack_exec_soft_transient_patterns | join('|') }}"
ansible.builtin.shell: |

@michburk michburk Sep 21, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not blocking: Logic itself lgtm but I don't love having a big block of shell script in the middle of this ansible file, do you think it would make sense to pull this script out into a dedicated file? It could live somewhere like roles/shiftstack/files/shiftstack_cmd_poll.sh

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call — extracted the poller to roles/shiftstack/files/shiftstack_cmd_poll.sh and invoke it from the wait task via role_path. Soft/hard transient handling and exit codes are unchanged; the Ansible task just sets the poll env vars and normalizes the attempts metadata from stderr.

Ride through brief API VIP blips (connection refused / i/o timeout)
with a consecutive failure budget instead of failing on the first poll
or spinning for the full 8h window when the API is truly unreachable.
Hard-transient patterns from openstack-k8s-operators#4150 keep the full poll timeout. Move the
poller into roles/shiftstack/files/shiftstack_cmd_poll.sh.

Signed-off-by: tusharjadhav3302 <tjadhav@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants