Skip to content

fix(crc): recover from VMI replacement - #17

Merged
caxu-rh merged 5 commits into
mainfrom
crc-vmi-recovery
Sep 4, 2026
Merged

fix(crc): recover from VMI replacement#17
caxu-rh merged 5 commits into
mainfrom
crc-vmi-recovery

Conversation

@caxu-rh

@caxu-rh caxu-rh commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Store one CRC identity Secret for each ClusterInstance. The crc-agent reuses its client and serving credentials after a VMI replacement.
  • Name crc-agent Jobs and handoff Secrets with the VMI UID. The agent watches its VMI and stops before it publishes a handoff for a deleted or replaced VMI.
  • Retain raw VMI handoffs. The controller rebuilds a missing published kubeconfig from the retained handoff.
  • Record guest API reachability as a condition and retry /readyz checks without deleting access resources. A VMI replacement clears stale published access and starts provisioning for the replacement VMI.
  • Delete crc-agent Jobs and raw handoffs by instance labels during ClusterInstance finalization.
  • Add controller, resource, agent, and E2E coverage. The E2E test supplies synthetic KubeVirt, CDI, and Route APIs and removes its CRC instance before manager undeploy.

Validation

  • go test ./internal/controller ./internal/resources
  • go test ./test/e2e -run "^$"
  • make test-e2e
  • go vet ./...
  • bin/golangci-lint run
  • git diff --check

@exe-prow-github-app

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: caxu-rh

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

The pull request process is described 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

@exe-prow-github-app exe-prow-github-app Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 3, 2026
@caxu-rh
caxu-rh force-pushed the crc-vmi-recovery branch 9 times, most recently from a919065 to 2d98be6 Compare September 4, 2026 19:09
Signed-off-by: Caleb Xu <caxu@redhat.com>
Assisted-by: OpenCode (GPT-5.6 Terra)
Signed-off-by: Caleb Xu <caxu@redhat.com>
Assisted-by: OpenCode (GPT-5.6 Terra)
Signed-off-by: Caleb Xu <caxu@redhat.com>
Assisted-by: OpenCode (GPT-5.6 Terra)
Signed-off-by: Caleb Xu <caxu@redhat.com>
Assisted-by: OpenCode (GPT-5.6 Terra)
Signed-off-by: Caleb Xu <caxu@redhat.com>
Assisted-by: OpenCode (GPT-5.6 Terra)
@caxu-rh

caxu-rh commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator Author

/lgtm

@exe-prow-github-app

Copy link
Copy Markdown
Contributor

@caxu-rh: you cannot LGTM your own PR.

Details

In response to this:

/lgtm

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/test-infra repository.

@caxu-rh
caxu-rh merged commit 95fcd3a into main Sep 4, 2026
7 of 8 checks passed
@caxu-rh
caxu-rh deleted the crc-vmi-recovery branch September 4, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant