Skip to content

fix(start): make retry-loop containers self-removing - #250

Closed
OzzyHelper wants to merge 1 commit into
FilOzone:mainfrom
OzzyHelper:koan/implement-248
Closed

OzzyHelper wants to merge 1 commit into
FilOzone:mainfrom
OzzyHelper:koan/implement-248

Conversation

@OzzyHelper

@OzzyHelper OzzyHelper commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Read-only docker run invocations inside startup retry loops used a fixed --name without --rm, so a failed attempt left a stopped container behind and every subsequent retry failed instantly with "container name is already in use". These containers are now self-removing, and the remaining endorsement container names are scoped by run id.

Closes #248

Changes

  • Added docker::shell::ephemeral_run_args(name, user) as the single source for the run --rm --name <n> -u <u> --network host prefix.
  • Used it for MockUSDFC verification, the three PDP registry read queries, and the endorsement receipt and provider-list checks.
  • Embedded run_id in the foc-verify-endorse-* and foc-get-provider-ids container names so an interrupted run cannot block the next start.
  • Transaction containers (registration, endorsement send) are unchanged and keep their containers for post-mortem log inspection.
  • Added test_ephemeral_run_args_remove_container_on_exit pinning the --rm/--name/--network host contract.

Test plan

  • cargo fmt --all — clean.
  • cargo clippy --lib -- -D warnings — clean.
  • cargo test --lib — 52 passed; the 2 failures are the pre-existing Docker-dependent status tests (test_print_running_status, test_print_uptime) that fail without a Docker CLI.

Quality Report

Changes: 5 files changed, 124 insertions(+), 88 deletions(-)

Code scan: clean

Tests: skipped

Branch hygiene: 1 issue(s)

  • Branch is not pushed to remote

Read-only docker run invocations inside startup retry loops used a fixed
--name without --rm, so a failed attempt left a stopped container behind
and every subsequent retry failed instantly with "container name is
already in use".

Add docker::shell::ephemeral_run_args(name, user) as the single source for
the run --rm --name <n> -u <u> --network host prefix and use it for the
MockUSDFC verification, the three PDP registry read queries, and the
endorsement receipt and provider-list checks. Scope the endorsement
container names by run id so an interrupted run cannot block the next
start. Transaction containers are unchanged and keep their containers for
post-mortem log inspection.
@FilOzzy FilOzzy added this to FOC Nov 20, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC Nov 20, 2026
@Kubuxu Kubuxu closed this Nov 20, 2026
@github-project-automation github-project-automation Bot moved this from 📌 Triage to 🎉 Done in FOC Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

2 participants