Repository navigation
Conversation
Draft
1 of 8 tasks
pjeweb
added a commit
that referenced
this pull request
Nov 15, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 16, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 17, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 17, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 18, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 18, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 19, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 21, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 22, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 23, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 24, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 24, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 25, 2026
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.
Why
A routine restart, from the UI, an update or a scheduled shutdown, can cut a live stream or a phone's traffic going through the box without warning. The box should refuse a planned shutdown while it is actually streaming, and say why. At the same time, there has to be a clear way out in an emergency, and a stuck system bus must never freeze the interface.
What
systemctl stop ceralive, thensystemctl reboot.How: CeraUI asks logind, the system service that handles shutdown requests, for an inhibitor lock and keeps the file descriptor it returns; the kernel releases it if CeraUI exits. The request runs without blocking, with a 200 ms deadline and a one-second back-off after a failure, and a stream only starts once protection is confirmed. The main loop now also sends the systemd watchdog ping, so a hung backend is restarted instead of holding the lock forever.
Sits on #69 (merged). The companion image change, openstreambox/image-building-pipeline#38, makes safety power-key presses win over shutdown locks.
How to verify
With mock data, the power dialog shows each refusal reason, and the emergency override after a lock refusal. On a box with a stream running,
systemctl rebootas root is refused untilsystemctl stop ceralivehas run.apps/backend/src/tests/logind-stall.test.tschecks that a silent bus doesn't block the event loop or the watchdog.Testing and limits
reboot, scheduledshutdownand-idon't bypass this lock on the image; direct target activation and forced reboot are outside the supported procedure.Screenshots
Mock data, desktop 1280 px and mobile 390 px.
Risks
Someone who really needs to restart mid-stream now has to stop the stream first or use the root override. If logind misbehaves, the lock can't be taken and the stream won't start; the deadline and retry are there to keep that short.
Checklist