Skip to content

fix(kubevirt): fix vm_lifecycle pause/unpause blocked by REST mapper#884

Open
lyarwood wants to merge 2 commits intocontainers:mainfrom
lyarwood:kubevirt-pause
Open

fix(kubevirt): fix vm_lifecycle pause/unpause blocked by REST mapper#884
lyarwood wants to merge 2 commits intocontainers:mainfrom
lyarwood:kubevirt-pause

Conversation

@lyarwood
Copy link
Contributor

@lyarwood lyarwood commented Mar 5, 2026

Summary

  • Adds pause and unpause actions to the vm_lifecycle tool using KubeVirt's subresource API
  • Fixes AccessControlRoundTripper blocking requests to API groups not in the REST mapper (e.g. subresources.kubevirt.io), which prevented pause/unpause from working

lyarwood added 2 commits March 5, 2026 14:45
The vm_lifecycle tool only supported start, stop, and restart actions.
This meant AI agents could not pause/unpause VMs, causing them to fall
back to stopping VMs instead (which is a fundamentally different
operation). Add pause and unpause actions that use the KubeVirt
subresource API (subresources.kubevirt.io/v1) to suspend and resume
running VMIs in-place.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
The AccessControlRoundTripper was returning a RESOURCE_NOT_FOUND error
for any resource not found in the REST mapper. This blocked requests to
valid API endpoints like KubeVirt's subresources.kubevirt.io group, which
serves pause/unpause endpoints but isn't discoverable via the REST mapper.

Instead of blocking, pass the request through to the API server which is
the source of truth for what resources exist.

Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant