Repository navigation
install: wait up to 60 seconds for dpkg locks - #6
Merged
Merged
Conversation
Signed-off-by: Su Yang <soulteary@users.noreply.github.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Temporary dpkg contention from another package installation currently makes the installer's APT package installations fail immediately. This change gives those commands a bounded 60-second wait and still fails when the lock is not released in time.
- What I did
-o DPkg::Lock::Timeout=60to the APT prerequisite and Docker Engine package installations.uidmapandiptablesinstallation instructions, while preserving bothcommand -v apt-getavailability checks.- How I did it
The change uses APT's existing dpkg lock-acquisition timeout without introducing retries or changing package selection,
-y,-qq, or the existing--allow-downgradesbehavior. Bothapt-get updatecommands are unchanged:DPkg::Lock::Timeoutdoes not wait for their/var/lib/apt/lists/lock.APT added this capability in 1.9.11. Older APT versions do not provide the waiting behavior. This bounds dpkg lock acquisition, not the duration of the complete package installation; it does not resolve other lock types or package/dependency failures. See the APT lists-lock report.
Inspired by docker/docker-install#431. The option is kept out of
command -vchecks andapt-get update.- How to verify it
The offline suite runs captured installer control flow for Ubuntu and Debian, checks both install commands, version pinning with
--allow-downgrades, repository-only mode, unchanged update commands, and rootless dependency detection/instructions. It rejects the originalc57bd823baseline for its missing install lock timeouts.The dedicated CI job runs real lock tests in disposable official
ubuntu:22.04,ubuntu:24.04, anddebian:12-slimcontainers. The final test script was completely exercised locally in:ubuntu:24.04: APT 2.8.3, amd64; bounded timeout measured 60.2 seconds.debian:12-slim: APT 2.6.1, arm64; bounded timeout measured 60.0 seconds.Both final runs verified:
apt-get updatefail immediately even if given the dpkg timeout option.The live suite uses Python
fcntlrecord locks and pins the already-installedbashversion with downloads disabled. It requires an explicitly opted-in disposable container and does not install Docker, remove lock files, or validate Docker packages/service startup. README includes the reproducible container command. Local shell syntax, ShellCheck, Python syntax, CI YAML structure, andgit diff --checkpassed. The GitHub-hosted CI jobs have not yet run for this branch.- Description for the changelog
Wait up to 60 seconds for dpkg locks during APT package installation.
Submission
This PR targets
soulteary/docker-install:main. The commit is DCO signed off. A separate branch based on upstreammastercontains only this change, without the fork's mirror additions. Open the upstream comparison for manual submission. No upstream PR has been created.