openshift / openshift/oadp-operator
Make E2E pod command execution context-aware
Open
@kaovilai is already working on this.
Since Sep 18, 2026.
- Dominant language
- Go
- Stars
- 92
- Forks
- 93
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 43
Description
Summary
Make the E2E pod command-execution path context-aware. A stalled Kubernetes exec stream can currently exceed the retry and polling limits in the virtualization E2E helpers.
Required changes
- Thread
context.ContextthroughexecArgsInPod,ExecuteCommandInPodsSh, andExecuteShellCommandInPod. - Pass the context to the Kubernetes remote-command stream operation so cancellation stops a stalled exec.
- Update callers across the affected E2E helpers and test suites.
- Replace retry
time.Sleepcalls in the checksum and guest-exec paths with context-aware waits. - Preserve the current retry limits and existing error behavior where cancellation does not occur.
Rationale
RunGuestExecScript and checksum helpers use bounded retry or polling logic. Their command callback can still block indefinitely because the current exec stream is not cancellable. This makes the configured retry and polling limits ineffective when the API-server exec connection stalls.
Affected areas
tests/e2e/lib/k8s_common_helpers.gotests/e2e/lib/virt_helpers.go- E2E callers of
ExecuteCommandInPodsShandExecuteShellCommandInPod, includingtests/e2e/lib/velero_helpers.goand applicable*_test.gosuites.
Acceptance criteria
- A canceled context terminates a stalled pod exec operation.
- Checksum retry waits and guest-exec dispatch retry waits return promptly when their context is canceled.
RunGuestExecScriptpasses the poll callback context to command execution.- All command-execution callers compile with the context-aware API.
- The existing retry counts, backoff behavior, and non-cancellation error handling remain unchanged.
Backlinks
- Pull request: https://github.com/openshift/oadp-operator/pull/2450
- Review comment: https://github.com/openshift/oadp-operator/pull/2450#discussion_r4046510191
- Requested by: @kaovilai
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.