Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd-sysext: ensure daemon reloading #717

Closed
wants to merge 2 commits into from
Closed

Conversation

tormath1
Copy link
Contributor

@tormath1 tormath1 commented Apr 18, 2023

In this PR, we patch systemd-sysext to perform a daemon reload when running merge, unmerge and refresh subcommands. It's possible to skip the reload with --no-reload.

It allows to drop the daemon reload we have in the ensure-sysext.service (flatcar/init#96)

How to use

Current state:

$ sudo systemd-sysext merge
Using extensions 'podman'.
Merged extensions into '/usr'.
$ systemctl cat podman
# /usr/lib/systemd/system/podman.service
[Unit]
Description=Podman API Service
....
$ sudo systemd-sysext unmerge
Unmerged '/usr'.
$ systemctl cat podman
# Warning: podman.service changed on disk, the version systemd has loaded is outdated.
# This output shows the current version of the unit's original fragment and drop-in files.
# If fragments or drop-ins were added or removed, they are not properly reflected in this output.
# Run 'systemctl daemon-reload' to reload units.
Failed to cat /usr/lib/systemd/system/podman.service: No such file or directory

Patched state:

$ sudo systemd-sysext unmerge
Unmerged '/usr'.
$ systemctl cat podman
No files found for podman.service.

Testing done

  • Manual testing

Closes: flatcar/Flatcar#984

Last CI is failing because of: flatcar/mantle#429

@tormath1 tormath1 added the main label Apr 18, 2023
@tormath1 tormath1 self-assigned this Apr 18, 2023
@tormath1 tormath1 marked this pull request as draft April 19, 2023 07:38
this patch reloads the daemon when merging/unmerging a systemd sysext
image.

Signed-off-by: Mathieu Tortuyaux <[email protected]>
this pulls:
  * systemd/system: drop ensure-sysext.service workaround

Signed-off-by: Mathieu Tortuyaux <[email protected]>
@tormath1
Copy link
Contributor Author

Closing this - it was just testing purposes.

@tormath1 tormath1 closed this Jun 30, 2023
@tormath1 tormath1 deleted the tormath1/sysext branch June 30, 2023 10:51
@github-actions
Copy link

Build action triggered: https://github.com/flatcar/scripts/actions/runs/5422114680

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make upstream systemd-sysext reload the units by default
1 participant