Skip to content

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

Open
Caesarsage wants to merge 1 commit into
microcks:masterfrom
Caesarsage:fix/start-reconcile-container-state
Open

fix(start): reconcile instance status against container runtime before trusting it#456
Caesarsage wants to merge 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>
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