Skip to content

lib/src/reboot: use valid systemd-run arguments#1417

Merged
cgwalters merged 1 commit into
bootc-dev:mainfrom
rsturla:systemd-run-message
Jul 17, 2025
Merged

lib/src/reboot: use valid systemd-run arguments#1417
cgwalters merged 1 commit into
bootc-dev:mainfrom
rsturla:systemd-run-message

Conversation

@p5

@p5 p5 commented Jul 17, 2025

Copy link
Copy Markdown
Contributor

Closes #1416
Follow up to #1398

Switches to use --description instead of --message since Gemini's suggestion in the previous PR wasn't correct.

The current --message argument is not passed in correctly, causing reboots to never be invoked.

This PR appends the arguments to the reboot command correctly, which should result in successful restarts.


Would this bug warrant a new patch release? Concerned that if users are relying on the auto-update-reboot feature, their machines will not be updated until they manually reboot.

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request correctly fixes an invalid argument passed to systemd-run by replacing --message with the valid --description argument. The change is accurate and addresses the issue described. I've added one suggestion to improve code clarity and maintainability by separating the command-line flag and its value, which will also make it easier to manage the description string in the future.

Comment thread lib/src/reboot.rs Outdated
@cgwalters

cgwalters commented Jul 17, 2025

Copy link
Copy Markdown
Collaborator

Ugh having that previous PR get through CI is a very serious regression we need to root cause.

What's going on here is that --message is a valid argument in systemctl --message=x reboot (as distinct from the plain reboot wrapper) but we incorrectly passed it to systemd-run.

Also in this we should separate the arguments via -- explicitly.

@cgwalters cgwalters left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

See review comments

@cgwalters

Copy link
Copy Markdown
Collaborator

Would this bug warrant a new patch release? Concerned that if users are relying on the auto-update-reboot feature, their machines will not be updated until they manually reboot.

Yes we must fix this immediately

@p5

p5 commented Jul 17, 2025

Copy link
Copy Markdown
Contributor Author

Pushed a new commit passing it in as so:

systemd-run -- reboot --message="Initiated by bootc"

This successfully rebooted my machine.

Starting to look at tests, but this can probably be merged before then.

Comment thread lib/src/reboot.rs Outdated
Signed-off-by: Robert Sturla <robertsturla@outlook.com>

@cgwalters cgwalters left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks reasonable to me as is. I'm going to pull this PR and test it out myself now too.

@cgwalters

Copy link
Copy Markdown
Collaborator

Getting sidetracked by a testing framework, still looking at that

@cgwalters cgwalters merged commit 97e5ca2 into bootc-dev:main Jul 17, 2025
29 of 31 checks passed
@p5 p5 deleted the systemd-run-message branch August 23, 2025 09:27
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.

systemd-run fails with unknown --message option

2 participants