Skip to content

fix(start): reconcile instance status against container runtime before trusting it#456

Merged
Harsh4902 merged 1 commit into
microcks:masterfrom
Caesarsage:fix/start-reconcile-container-state
Jun 12, 2026
Merged

fix(start): reconcile instance status against container runtime before trusting it#456
Harsh4902 merged 1 commit into
microcks:masterfrom
Caesarsage:fix/start-reconcile-container-state

Conversation

@Caesarsage

Copy link
Copy Markdown
Contributor

Description

microcks start trusts the cached status: Running in ~/.config/microcks/config. If the container was removed externally (system restart, autoRemove, manual docker rm), the CLI wedges in "already running" with no recovery path.

This adds ContainerExists() to the container client and checks it before trusting the recorded status — a missing container now falls through to the fresh-create path. Also removes a duplicated "Running" check.

Reproduce:

  • microcks start --name demo
  • docker rm -f demo
  • microcks start --name demo
  • previously "already running",
  • now recreates the container.

Related issue(s)

An issue I ran into while experimenting with VS Code extension on top of the CLI.
LFX Mentorship
#255

…e trusting it

Signed-off-by: caesarsage <destinyerhabor6@gmail.com>

@Harsh4902 Harsh4902 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@Harsh4902 Harsh4902 merged commit 9a4fc69 into microcks:master Jun 12, 2026
8 checks passed
@Harsh4902 Harsh4902 added this to the Next milestone Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants