Repository navigation
fix(start): make retry-loop containers self-removing - #248
Closed
OzzyHelper wants to merge 1 commit into
Closed
OzzyHelper wants to merge 1 commit into
OzzyHelper wants to merge 1 commit into
Conversation
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 as the single source for the run --rm --name <n> -u <u> --network host prefix and use it for 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.
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.
Summary
Read-only
docker runinvocations inside startup retry loops used a fixed--namewithout--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.Refs #246
Closes #243
Changes
docker::shell::ephemeral_run_args(name, user)as the single source for therun --rm --name <n> -u <u> --network hostprefix.run_idin thefoc-verify-endorse-*andfoc-get-provider-idscontainer names so an interrupted run cannot block the next start.test_ephemeral_run_args_remove_container_on_exitpinning the--rm/--name/--network hostcontract.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: 4 files changed, 105 insertions(+), 111 deletions(-)
Code scan: clean
Tests: skipped
Branch hygiene: 1 issue(s)