fix: incorrect reporting of Stopped, add better error reporting#32
Merged
sjmiller609 merged 2 commits intomainfrom Dec 10, 2025
Merged
fix: incorrect reporting of Stopped, add better error reporting#32sjmiller609 merged 2 commits intomainfrom
sjmiller609 merged 2 commits intomainfrom
Conversation
…known state Summary of Changes Root Cause Fix - **`lib/vmm/client.go`**: Added `DisableKeepAlives: true` to prevent HTTP connection leaks that caused cloud-hypervisor to hit its connection limit and reject queries Improved Error Handling - **`lib/instances/types.go`**: Added `StateUnknown` constant and `StateError *string` field to Instance - **`lib/instances/query.go`**: Refactored `deriveState` to return `StateUnknown` with error details instead of silently returning `StateStopped`; added warning-level logging for all failure cases - **`lib/instances/state.go`**: Added `StateUnknown` to valid transitions (empty — no operations allowed) and `RequiresVMM()` - **`lib/instances/delete.go`**: Delete now attempts VMM cleanup for `StateUnknown` instances (since we don't know if VMM is running) API Updates - **`openapi.yaml`**: Added `Unknown` to `InstanceState` enum and `state_error` field to Instance schema - **`cmd/api/api/instances.go`**: Added `StateError` to API response mapping - Regenerated oapi code
✱ Stainless preview buildsThis PR will update the ✅ hypeman-go studio · code
⚡ hypeman-cli studio · conflict
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
sjmiller609
commented
Dec 10, 2025
sjmiller609
commented
Dec 10, 2025
Comment on lines
+59
to
+63
| // Disable keep-alives to prevent connection leaks. | ||
| // Each NewVMM call creates a new transport, so connection pooling | ||
| // just causes connections to accumulate until cloud-hypervisor | ||
| // hits its connection limit. | ||
| DisableKeepAlives: true, |
Collaborator
Author
There was a problem hiding this comment.
This is the fix
rgarcia
approved these changes
Dec 10, 2025
sjmiller609
added a commit
that referenced
this pull request
Feb 28, 2026
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.
Note
Report accurate instance state by introducing
Unknownwithstate_error, updating derivation, API responses, deletion logic, and disabling VMM HTTP keep-alives.stateResultreturningStateand optional error; returnStateUnknownwithstate_errorwhen VMM socket exists but is unreachable or errors.StateUnknowntoState, disallow transitions, and exclude fromRequiresVMM.StateErrorinInstance;toInstancepopulates it.Unknown.instanceToOAPInow setsstate_errorinoapi.Instance.UnknowntoInstanceState; document and exposestate_errorfield.IngressMatch.hostnameandIngressTarget.instancedocs.oapiclient/server with updated spec (embedded swagger updated).NewVMMto prevent Unix socket connection leaks.Written by Cursor Bugbot for commit b46143a. This will update automatically on new commits. Configure here.