Skip to content

feat: add QMP lifecycle control and narrow public API#21

Merged
genedna merged 1 commit into
buck2hub:mainfrom
jjl9807:dev
May 22, 2026
Merged

feat: add QMP lifecycle control and narrow public API#21
genedna merged 1 commit into
buck2hub:mainfrom
jjl9807:dev

Conversation

@jjl9807
Copy link
Copy Markdown
Collaborator

@jjl9807 jjl9807 commented May 22, 2026

  • Integrate QMP for graceful VM shutdown and running-state queries.
  • Make SSH launch timeout configurable and support ephemeral images via auto-cleanup.
  • Add builder-style chaining for ImageConfig and MachineConfig.
  • Tighten the public API surface and align doc comments with rustdoc conventions.

- Integrate QMP for graceful VM shutdown and running-state queries.
- Make SSH launch timeout configurable and support ephemeral images via auto-cleanup.
- Add builder-style chaining for `ImageConfig` and `MachineConfig`.
- Tighten the public API surface and align doc comments with rustdoc conventions.

Signed-off-by: jl.jiang <jiangjl9807@gmail.com>
@genedna genedna merged commit b35961d into buck2hub:main May 22, 2026
4 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

qlean/src/image.rs

Lines 615 to 616 in 274a42e

if let Ok(image) = Self::load(&name).await {
return Ok(image);

P2 Badge Honor clear flag when loading a cached image

When a cached image exists, Image::new returns it immediately and ignores the caller’s ImageConfig.clear request. This breaks the new ephemeral-image contract: users asking for auto-cleanup can get an Image loaded with cached metadata (typically clear = false), so the image file is retained after drop instead of being removed.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/machine.rs
return Ok(false);
}
let socket_path = qmp::qmp_socket_path(&self.id)?;
Ok(qmp::query_running(&socket_path).await.unwrap_or(false))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Propagate QMP errors from running-state checks

Machine::is_running currently maps any QMP failure to false with unwrap_or(false), which makes callers treat communication failures as “VM not running.” In MachinePool::shutdown_all, that means a live VM can be skipped entirely if QMP is temporarily unreachable, leaving the QEMU process orphaned instead of surfacing an error and attempting teardown.

Useful? React with 👍 / 👎.

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.

2 participants