Skip to content

🐛 QD-16277 Start podman via systemd socket activation instead of polling for readiness - #1053

Merged
Anna Zhukova (bindreams) merged 6 commits into
mainfrom
azhukova/QD-16277
Oct 6, 2026
Merged

Anna Zhukova (bindreams) merged 6 commits into
mainfrom
azhukova/QD-16277

Conversation

@bindreams

@bindreams Anna Zhukova (bindreams) commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes QD-16277.

start-podman.sh no longer sleep-polls anything it started. podman system service now runs as a transient systemd socket + service pair (setup-podman), so every wait is on a real primitive.

How it waits now

  • Socket: systemd-run --socket-property=ListenStream=… returns once the socket is bound, owned by the runner user and listening. Clients queue in the backlog until podman (started by the first connection) accepts.
  • API: a single curl /_ping. --max-time 120 is only the failure bound for podman hanging. The registry pull and DNS probe from 🐛 QD-16180 Fix podman 6 container networking and pin podman 6.1.2 #1050 keep their own bounds, which are on the network.
  • Stale service: gone. The action runs once per job on a fresh VM; a second invocation now fails with ::error:: instead of restarting podman.

Non-obvious settings

  • StartLimitBurst=1, StartLimitIntervalSec=infinity: PID 1 owns the socket, so a podman that dies without accepting would be re-activated by the queued connection, and a crash would read as a hang.
  • Service output goes to a file in a mktemp -d directory, not the journal. The journal ingests stdout asynchronously, so a file is the only log guaranteed complete when the probe fails. It sits in its own directory because fs.protected_regular refuses root's open of a user-owned file in sticky /tmp.
  • fail() stops the unit before dumping systemctl status, so the dump doesn't race systemd reaping podman.
  • OOMScoreAdjust inherits the step's value, as the backgrounded sudo podman did.

Verification

  • A 13-case fault-injection harness (not committed) runs in Ubuntu 24.04 systemd VMs on podman 5.8.4 and 6.1.2, all passing. It covers:
    • a fresh start, and a second invocation that must fail while the first service keeps serving;
    • podman crashing before and after accept(), fast and slow;
    • podman hanging before and after accept(), and answering with an HTTP error;
    • a stale file or directory at the socket path;
    • DOCKER_HOST pointing at a dead endpoint or at another engine.
  • PR matrix 36017419718, including podman@6.1.2.
  • podman@latest 36017415200: green end to end.

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Qodana for Go

132 new problems were found

Inspection name Severity Problems
Check dependency licenses 🔴 Failure 5
Vulnerable declared dependency 🔴 Failure 1
Check GO source code coverage 🔶 Warning 67
Unhandled error 🔶 Warning 13
Potential resource leak 🔶 Warning 6
Check dependency licenses 🔶 Warning 4
Deprecated element 🔶 Warning 4
Imported package name as a name identifier 🔶 Warning 3
Reserved word used as name 🔶 Warning 1
Vulnerable declared dependency 🔶 Warning 1
Unsorted imports ◽️ Notice 13
Name starts with a package name ◽️ Notice 8
Empty slice declared using a literal ◽️ Notice 3
Comment of exported element starts with the incorrect name ◽️ Notice 1
Redundant type conversion ◽️ Notice 1
Vulnerable declared dependency ◽️ Notice 1
@@ Code coverage @@
+ 65% total lines covered
11352 lines analyzed, 7415 lines covered
# Calculated according to the filters of your coverage tool

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Qodana for Go

135 new problems were found

Inspection name Severity Problems
Check dependency licenses 🔴 Failure 5
Vulnerable declared dependency 🔴 Failure 3
Check GO source code coverage 🔶 Warning 64
Unhandled error 🔶 Warning 13
Potential resource leak 🔶 Warning 6
Check dependency licenses 🔶 Warning 4
Deprecated element 🔶 Warning 4
Imported package name as a name identifier 🔶 Warning 3
Vulnerable declared dependency 🔶 Warning 3
Reserved word used as name 🔶 Warning 1
Unsorted imports ◽️ Notice 13
Name starts with a package name ◽️ Notice 8
Empty slice declared using a literal ◽️ Notice 3
Vulnerable declared dependency ◽️ Notice 3
Comment of exported element starts with the incorrect name ◽️ Notice 1
Redundant type conversion ◽️ Notice 1
@@ Code coverage @@
+ 66% total lines covered
11230 lines analyzed, 7415 lines covered
# Calculated according to the filters of your coverage tool

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bindreams
Anna Zhukova (bindreams) marked this pull request as ready for review October 6, 2026 14:56
@bindreams
Anna Zhukova (bindreams) requested a review from a team as a code owner October 6, 2026 14:56
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T15:01:36.008629Z 224b6d8 Draft marked ready
ℹ️ About Codex in GitHub

Your 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.

@bindreams
Anna Zhukova (bindreams) merged commit b1e5754 into main Oct 6, 2026
15 checks passed
@bindreams
Anna Zhukova (bindreams) deleted the azhukova/QD-16277 branch October 6, 2026 14:56
Vladimir Shtarev (DarkMechanikum) pushed a commit that referenced this pull request Oct 6, 2026
* 🐛 QD-16178 Pin podman container-engine version (#1041)

(cherry picked from commit 6ffe18f)

* 🐛 QD-16178 Fix podman readiness wait that could only succeed on the first poll (#1042)

(cherry picked from commit 88361c1)

* 🐛 QD-16180 Fix podman 6 container networking and pin podman 6.1.2 (#1050)

(cherry picked from commit 7a04e72)

* 🔧 QD-16287 Stop Renovate aborting on Maven Central 429s (#1054)

(cherry picked from commit 0bee897)

* 🔧 QD-16181 Pin CI container engines and tools, and let Renovate bump them (#1055)

(cherry picked from commit 810ee26)

* 🐛 QD-16277 Start podman via systemd socket activation instead of polling for readiness (#1053)

(cherry picked from commit b1e5754)

---------

Co-authored-by: Evgeny Im <evgenii.im@jetbrains.com>
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.

2 participants