-
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
Add missing dependency crun to the podman spec #17587
Conversation
quadlet uses crun as the runtime, but crun is not required in any way by podman Signed-off-by: Dan Čermák <[email protected]>
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.
We've had that setup to allow people to use runc and remove crun if they wish. But if quadlet can only use crun and not runc, then I can change it to a hard dep on crun. I'd also like to know how I should update runc dep then. EDIT: aforementioned crun removal only works on fedora workstation, not on fedora server. |
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.
While I agree the dependency should be updated, I'd prefer not to do it in podman.spec.rpkg
. It's best handled in containers-common-extra fedora package. That reminds me, I'll need to remove some other dependencies from here.
We should probably also explore why Quadlet has a hard dep on crun. |
Any particular reason for that? Burying direct dependencies in dependent spec files can make it very easy to forget to update them if dependencies are removed or added. |
It's hardcoded here: podman/pkg/systemd/quadlet/quadlet.go Lines 317 to 321 in bac20d1
|
There are many dependencies common to both buildah and podman, and also some to skopeo. The podman.spec.rpkg is not the official fedora spec. It generates builds on rhcontainerbot/podman-next . So, it's a lot cheaper to list common dependencies for multiple packages hosted in multiple repos in 1 single common dependency package which is containers-common. |
@alexlarsson added this hard coded setting in
|
quadlet is a podman only feature, so the requirement on |
I think that's the right thing to do. Quadlet enforcing crun would otherwise ignore the settings in containers.conf. |
@giuseppe would that work with runc as well? |
@vrothberg does buildah never need crun ? |
Any runtime would do the job for Buildah. There is no hard dep on crun. |
Ack. Going by the kinda parallel conversation on this PR, if quadlet can use runc soon, then we can keep the dependency list as-is inside containers-common-extra. Please correct me if I'm wrong. @dcermak btw, in containers-common fedora package, the |
if that's gonna take longer than expected, I'm fine with merging this PR. HTH. |
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.
Given that quadlet is a crun-only feature for now, I'm cool with this. This can be reverted whenever we have runc support.
/lgtm
/hold
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dcermak, lsm5 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 |
yes that works with runc too |
Thanks! In that case, I suggest to remove these lines from Quadlet. Then, we don´t need any change to the spec. |
crun is a better match for what quadlet does imho, but yeah, really there isn't I think any particular reason to hardcode it. I don't think we really should allow per-quadlet-file options for runtime though. It seems like this would be more of a global option for all quadlet services? Or maybe just use whatever the systemwide default is for all podman runs. |
@giuseppe And log=passthrough work with runc too? |
Please add: diff --git a/test/system/252-quadlet.bats b/test/system/252-quadlet.bats
index 03b6497d7..b0cdc4cc5 100644
--- a/test/system/252-quadlet.bats
+++ b/test/system/252-quadlet.bats
@@ -16,6 +16,11 @@ function start_time() {
function setup() {
skip_if_remote "quadlet tests are meaningless over remote"
+ runtime=$(podman_runtime)
+ if [[ "$runtime" != "crun" ]]; then
+ skip "runtime is $runtime; quadlet only works with crun"
+ fi
+
test -x "$QUADLET" || die "Cannot run quadlet tests without executable \$QUADLET ($QUADLET)"
start_time |
I've not tried but it should work there as well, the handling is in conmon |
Once @edsantiago 's concern is addressed, LGTM |
Following the comments from @alexlarsson and @giuseppe about the ability to use other runtimes, I think we should not merge this change and instead remove the hardcoded setting in Quadlet. I'll open a PR for if |
Agreed, sounds like the much better solution. |
quadlet uses crun as the runtime, but crun is not required in any way by podman
Does this PR introduce a user-facing change?