Skip to content

Install systemd unit templates with an explicit safe mode - #2479

Merged
orbi-build[bot] merged 2 commits into
mainfrom
orbi/orbi-build-orbi-issue-2455
Nov 28, 2026
Merged

orbi-build[bot] merged 2 commits into
mainfrom
orbi/orbi-build-orbi-issue-2455

Conversation

@orbi-build

@orbi-build orbi-build Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Fixes #2455

Install systemd unit templates with an explicit safe mode (run_id=4d761d28)

Built by Orbi from Issue #2455

The install wrote rendered templates with Path.write_bytes(), so the caller umask decided the installed mode (0664 under Kit fleet refresh umask 002). Write every managed unit through the new installed_units leaf, which chmods the explicit 0644 independent of the umask and normalizes a legacy mode on the same write. The drift decision now counts a group-/other-writable managed unit as drift, so the existing pre-start self-heal repairs a legacy mode; the unit_drift line and event carry the observed mode=. Unrelated files keep their permissions.

Fixes #2455
…ode (#2455)

The drift check now treats a group-/other-writable managed unit as drift,
so every fixture that fabricates a "clean" installed unit must carry the
mode a real install writes. Writing them with the raw write/copyfile
inherits the ambient umask: under `umask 002` (the deployment scene this
Issue is about) 26 tests failed — test_systemd_deploy, test_orbi's doctor
scene, the preflight self-heal and the e2e concurrency suite — while the
product itself was correct.

All four fixtures now go through `installed_units.write_unit`, the one
writer of a managed installed unit, so the suite's clean/drift scenes no
longer depend on the caller's umask. Verified: the four suites pass under
`umask 002`.
@orbi-build
orbi-build Bot merged commit f04179b into main Nov 28, 2026
2 checks passed
@orbi-build

orbi-build Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

✅ Orbi 已交付 · 查看交付证明 →

@orbi-build
orbi-build Bot deleted the orbi/orbi-build-orbi-issue-2455 branch November 28, 2026 12:11
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.

Install systemd unit templates with an explicit safe mode

0 participants