fix(docker-engine): install python3-debian first #45

Merged
claudiomaradonna merged 1 commit from fix/docker-engine-python-debian into main 2026-10-22 23:23:20 +02:00
Collaborator

Why

docker-engine's install mode failed at "Add the upstream Docker apt
repository" on hosts without python3-debian, in --check and in a real
run. deb822_repository needs the Python debian library on the target,
and nothing installed it. The failure showed up on the home swarm nodes
when they were switched to install mode for #44's log options.

What changed

  • Install mode now installs python3-debian with apt before it adds the
    repository.
  • Under --check, a host that does not have python3-debian yet skips the
    repository task and says so, so the rest of the run still previews.
  • The README now says where that preview still stops: until Docker's
    repository is on the host, --check stops at the package task, because
    apt does not refresh its lists in check mode. After the first live run,
    --check previews in full.

How to verify

  • On a node without python3-debian that already runs Docker, run
    ansible-playbook fortify.yml -i inventory/<tenant>/ -e target=<node> --tags docker-engine --check --diff. Expected: it says the repository
    waits on python3-debian, and the run continues past it.
  • Run ./tests/gates/check_docker_engine.sh on a controller whose
    /usr/bin/python3 has apt but not debian. The new case passes. On
    main, its play fails with "python3-debian must be installed to use
    check mode".

Checks already run on the tip:

  • make check passed.
  • .agents/hooks/shellcheck.sh repo passed.
  • check_docker_engine.sh passed, but its new case reported not run,
    because the sandbox's system Python has no apt.
  • Not run: make test, because podman was not available.

Considerations

  • Under --check, the new apt task needs python3-apt on the target. The
    package task after it already needed it.
  • The gate case runs only on some controllers, because the module looks for
    the library on the system Python, which no stub can replace.
  • Review findings set aside, both low:
    • The CONTRIBUTING Gates row does not mention the venv condition, which
      the gate's skip message states.
    • A "then" in the README's --check paragraph ties the stop at the
      package task to the skipped repository, but the stop happens on any
      host whose sources lack docker-ce.
## Why `docker-engine`'s install mode failed at "Add the upstream Docker apt repository" on hosts without `python3-debian`, in `--check` and in a real run. `deb822_repository` needs the Python `debian` library on the target, and nothing installed it. The failure showed up on the `home` swarm nodes when they were switched to install mode for #44's log options. ## What changed - Install mode now installs `python3-debian` with apt before it adds the repository. - Under `--check`, a host that does not have `python3-debian` yet skips the repository task and says so, so the rest of the run still previews. - The README now says where that preview still stops: until Docker's repository is on the host, `--check` stops at the package task, because apt does not refresh its lists in check mode. After the first live run, `--check` previews in full. ## How to verify - On a node without `python3-debian` that already runs Docker, run `ansible-playbook fortify.yml -i inventory/<tenant>/ -e target=<node> --tags docker-engine --check --diff`. Expected: it says the repository waits on python3-debian, and the run continues past it. - Run `./tests/gates/check_docker_engine.sh` on a controller whose `/usr/bin/python3` has `apt` but not `debian`. The new case passes. On `main`, its play fails with "python3-debian must be installed to use check mode". Checks already run on the tip: - `make check` passed. - `.agents/hooks/shellcheck.sh repo` passed. - `check_docker_engine.sh` passed, but its new case reported not run, because the sandbox's system Python has no `apt`. - Not run: `make test`, because podman was not available. ## Considerations - Under `--check`, the new apt task needs `python3-apt` on the target. The package task after it already needed it. - The gate case runs only on some controllers, because the module looks for the library on the system Python, which no stub can replace. - Review findings set aside, both low: - The CONTRIBUTING Gates row does not mention the venv condition, which the gate's skip message states. - A "then" in the README's `--check` paragraph ties the stop at the package task to the skipped repository, but the stop happens on any host whose sources lack `docker-ce`.
deb822_repository needs the Python debian library on the target, and
nothing installed it: install mode failed at the repository task on a
host without python3-debian, under --check and in a real run. Install
it with apt first; under --check, where it cannot be installed yet,
skip the repository with a notice so the rest of the run previews.
claudiomaradonna deleted branch fix/docker-engine-python-debian 2026-10-22 23:23:28 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
claudiomaradonna/castrum!45
No description provided.