-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
quadlet: Support systemd style dropin files #20828
quadlet: Support systemd style dropin files #20828
Conversation
Please update the man page. |
For a source file like `foo.container`, look for drop in named `foo.container.d/*.conf` and merged them into the main file. The dropins are applied in alphabetical order, and files in earlier diretories override later files with same name. This is similar to how systemd dropins work, see: https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html Also adds some tests for these Signed-off-by: Alexander Larsson <[email protected]>
8e265fa
to
8ee2622
Compare
@rhatdan Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely idea, LGTM
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alexlarsson, vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@ygalblum PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add more tests, i.e. test for [Service]
and [Unit]
sections as well as the other quadlet specific sections.
Great addition and the code LGTM. But, I do have some comments/questions about the doc and tests. I think I understand what happened in the override tests - the empty Anyhow, I think the man page should elaborate some more on how the drop-in should look like. Also, I think the tests should include different types of keys. The |
This is just in general how the systemd syntax works for list-kind of keys. It also works inside a single file. I'm not sure we have a specific doc for it in the quadlet manpage, but anyone used to systemd will know about this, and I believe we link to the systemd docs for this in the quadlet manpage. I'll add some more tests. |
LGTM not sure what's wrong with CI but seems not specific with this patch. |
/lgtm |
For a source file like
foo.container
, look for drop in namedfoo.container.d/*.conf
and merged them into the main file. The dropins are applied in alphabetical order, and files in earlier diretories override later files with same name.This is similar to how systemd dropins work, see:
https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html
Also adds some tests for these
This seems useful for things like:
containers/qm#284
It also allows a non-auto-enabled quadlet, i.e. without an install section, to easily add one using a dropin.
Does this PR introduce a user-facing change?