Skip to content

test: preserve private dockerd options on restart - #24511

Open
fiona-xie wants to merge 1 commit into
goharbor:mainfrom
fiona-xie:fix/private-dockerd-restart
Open

fiona-xie wants to merge 1 commit into
goharbor:mainfrom
fiona-xie:fix/private-dockerd-restart

Conversation

@fiona-xie

@fiona-xie fiona-xie commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Private-network setup starts dockerd with --iptables=false, but restart_process() previously restarted it without that option. Where legacy iptables NAT initialization is unavailable, Content Trust cannot restart the daemon, causing subsequent Docker-dependent tests to fail.

image

Issue being fixed

Fixes #(issue)
Preserve the private-network option while honoring explicit arguments, wait for Docker API readiness, and include startup logs in restart failures

[Test]
Validated the updated restart helper in a private-network environment
The Project Level Policy Content Trust test passed. The newly generated restart log confirms that dockerd completed initialization and exposed its API

root@corgi-jumper:~/mirrors_github_harbor# grep -E 'Daemon has completed initialization|API listen|failed to start daemon' \
>   daemon-dockerd-restart.log
time="2026-12-01T14:09:42.852763120Z" level=info msg="Daemon has completed initialization"
time="2026-12-01T14:09:42.919099880Z" level=info msg="API listen on /var/run/docker.sock"
image

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

Signed-off-by: fx036533 <fei-fx.xie@broadcom.com>
@codecov

codecov Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.25%. Comparing base (3cc8b5c) to head (f055254).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #24511      +/-   ##
==========================================
- Coverage   74.27%   74.25%   -0.02%     
==========================================
  Files        1096     1096              
  Lines      103611   103611              
  Branches     3079     3079              
==========================================
- Hits        76953    76936      -17     
- Misses      26290    26306      +16     
- Partials      368      369       +1     
Flag Coverage Δ
unittests 74.25% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 8 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fiona-xie
fiona-xie marked this pull request as ready for review December 1, 2026 14:31
@fiona-xie
fiona-xie requested a review from a team as a code owner December 1, 2026 14:31

This branch has not been deployed

No deployments
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.

4 participants