openshift / openshift/oadp-operator

Make E2E pod command execution context-aware

Open
#2,451 0 comments 0 reactions 1 assignee View on GitHub

@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.Context through execArgsInPod, ExecuteCommandInPodsSh, and ExecuteShellCommandInPod.
  • 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.Sleep calls 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.go
  • tests/e2e/lib/virt_helpers.go
  • E2E callers of ExecuteCommandInPodsSh and ExecuteShellCommandInPod, including tests/e2e/lib/velero_helpers.go and applicable *_test.go suites.

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.
  • RunGuestExecScript passes 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.