-
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 - Add support for .pod units #20762
Conversation
@vrothberg PTAL. |
@edsantiago can you please take a look at the test I added. My main problem is with the sleep I added. The problem is that since the services are linked with "Want" and "Before", I need to wait for the container service to transition from Activating to Active. But, AFAIK there's no way to do a retry on the assert. |
1512813
to
f170fba
Compare
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.
Thanks for putting this together, @ygalblum ! Quite impressive how elegantly pods can be supported in Quadlet. Just some nits and a comment on the dependencies.
The units from generate systemd
set dependencies between the units which I do not see here:
Wants=container-...
Before=container-...
and
BindsTo=pod-...
After=pod-...
@vrothberg Regarding your comment about the dependencies. The unit for the The unit for the For example,
Produce the following:
|
f170fba
to
a293e86
Compare
Thanks a lot, @ygalblum! I should have paid more attention to the docs. I left another comment on that subject. The rest LGTM. Great work! |
a293e86
to
3c91be4
Compare
3c91be4
to
de01dfb
Compare
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.
LGTM
Just spotted two missing dots.
@rhatdan @edsantiago PTAL
Cockpit tests failed for commit 48a348a9d0fe849356f510f4b3b8c0ae84e6de62. @martinpitt, @jelly, @mvollmer please check. |
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.
LGTM, with one documentation request and one test-log-cleanup request. And could you please squash your commits? Thank you!
@@ -72,7 +70,8 @@ Quadlet requires the use of cgroup v2, use `podman info --format {{.Host.Cgroups | |||
### Service Type | |||
|
|||
By default, the `Type` field of the `Service` section of the Quadlet file does not need to be set. | |||
Quadlet will set it to `notify` for `.container` and `.kube` files and to `oneshot` for `.volume`, `.network` and `.image` files. | |||
Quadlet will set it to `notify` for `.container` and `.kube` files, | |||
`forking` for `.pod` and `oneshot` for `.volume`, `.network` and `.image` files. |
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.
This takes a few retries for my brain to parse. I think 'files' and a comma would help:
... for
.pod
files, and ...
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.
Done
|
||
# Container should not exist | ||
run_podman 1 container exists ${container_name} | ||
} |
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.
Please add run_podman rmi $(pause_image)
to avoid nasty red warnings.
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.
Done
Add support for .pod unit files with only PodmanArgs, GlobalArgs, ContainersConfModule and PodName Add support for linking .container units with .pod ones Add e2e and system tests Add to man page Signed-off-by: Ygal Blum <[email protected]>
48a348a
to
6b2f481
Compare
@edsantiago all done. Thanks |
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.
/lgtm
/hold
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: edsantiago, vrothberg, ygalblum 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 |
/hold cancel Thanks @ygalblum |
Should it be merged into 4.8 branch? I have 4.8.3 on Archlinux and pod support seems not to be present: |
@gdmn Sorry, but the support for |
Add support for .pod unit files with only PodmanArgs, GlobalArgs, ContainersConfModule and PodName
Add support for linking .container units with .pod ones
Add e2e and system tests
Add to man page
Does this PR introduce a user-facing change?
Yes
Resolves: #17687