fix(kubevirt): fix vm_lifecycle pause/unpause blocked by REST mapper#884
Open
lyarwood wants to merge 2 commits intocontainers:mainfrom
Open
fix(kubevirt): fix vm_lifecycle pause/unpause blocked by REST mapper#884lyarwood wants to merge 2 commits intocontainers:mainfrom
lyarwood wants to merge 2 commits intocontainers:mainfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vm_lifecycletool using KubeVirt's subresource APIAccessControlRoundTripperblocking requests to API groups not in the REST mapper (e.g.subresources.kubevirt.io), which prevented pause/unpause from working