-
Notifications
You must be signed in to change notification settings - Fork 274
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
Podman support beta #674
Podman support beta #674
Conversation
in #679 we have added support for CPU quota and mem limits |
0910749
to
98df40b
Compare
All right, finally managed to get back to this. For build process to work without cgo and extra dependencies need to add a few build tags
Will add #679 soon and do more checks to see how it behaves with the latest main. |
2dfbebf
to
fa8c422
Compare
Looks decent for a beta. Still need to add ipv6/dual-stack for mgmt addressing (prob. will do this separately); update docs & the build pipeline. |
//go:build linux && podman | ||
// +build linux,podman | ||
|
||
package all | ||
|
||
import ( | ||
_ "github.com/srl-labs/containerlab/runtime/containerd" | ||
_ "github.com/srl-labs/containerlab/runtime/docker" | ||
_ "github.com/srl-labs/containerlab/runtime/ignite" | ||
_ "github.com/srl-labs/containerlab/runtime/podman" | ||
) |
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.
do we still need build tags to have a build with podman, considering that you managed to exclude cgo dependency?
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.
In principle - we don't; but the build process would require the presence of the other tags i mentioned earlier:
exclude_graphdriver_btrfs btrfs_noversion exclude_graphdriver_devicemapper exclude_graphdriver_overlay containers_image_openpgp
In the current form this is a safety first approach: in case of no tags go build
will succeed without podman (based on runtime/all/all.go); otherwise we expect to see all the tags (I even contemplated to include them all).
It's a little bit ugly either way. 😞
I suspect this approach might be more straightforward for external contributors..
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.
yes, that is what I thought, but once this PR is done, I think it would be best to include podman support to the GA build of containerlab (ofc we will include those tags to a regular build pipeline delivered by goreleaser)
That way it would be possible to let users with podman to play with it, without fetching separate binary. At this point, the binary increase that podman will incur won't matter much I guess.
we can keep the all
and all_w_podman
files for the time being
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.
I think it would be best to include podman support to the GA build of containerlab
I mean, that is the plan;
the question is whether we want to keep an option to build clab without podman support for other contributors?
Do you know which build tag is missing in my trial to build the tip of that branch with the following cmd on ubuntu 20.04
I've asked the same q here - containers/podman#6866 (comment) |
Nothing to do with the tags; just a regular dependency management pain :) |
ouch, I wonder how did you find it out? My google foo led to me to similar reports without a solution |
Looks like the new containerd version introduced dependency on the regular v1.0.2 of image-spec; so poor go mod cannot resolve this anymore. Duh. |
@hellt can you try this one. bumped to non-released v1.0.3, that should do it. |
I have a weird issue when I try this branch with podman installed on ubuntu 20.04
podman cli works:
which makes me think that it talks to a socket? But the clab fails:
and there is no socket file by that path
|
Right; |
htmltest launched in CI will have github.com links excluded to remove 429 responses
Thanks @LimeHat, that is a solid chunk of work! I have tuned the test pipeline a bit to accommodate for podman smoke tests Currently I excluded the following tests, please check if my understanding is correct as to why these tests can not be currently executed with the podman runtime 1 Matching IPv6 address in
|
Hi Roman, thanks for the thorough review & test efforts! 👍 So for 1-3), AFAIR, I encountered a limitation of the current API design where we cannot supply 2 distinct subnets to the network create call. So v6 itself it not an issue (I could've implemented it as either v4 or v6), but dual-stack is challenging. There are potential ways to workaround this (e.g. switch to a lower-level API or just implement custom cni cfg file logic); I just haven't spend enough time on this and planned to implement this later. For 4-6 - right.. I see I left a TODO item in the code on this 😄 let me check if i can accommodate custom bridge naming without too much hassle, I think I may be able to. Anyway, all the good points, and thanks for jogging my memory on the bridge naming thing. I'll look into it and get back to you soon. |
Thanks @LimeHat |
As discussed. Added build tags to avoid breaking things