-
Notifications
You must be signed in to change notification settings - Fork 91
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
First steps of quadlet integration #1965
Conversation
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.
Looks good and I agree that it makes sense to drop healthcheck from kebab. I only have one minor comment/question on testing. Let's also wait for design review.
9459c7c
to
cac26a0
Compare
We need the tests to check for |
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! Looks good to me!
cac26a0
to
9dcc576
Compare
9dcc576
to
860291a
Compare
RHEL-8-10 seems broken
|
eaa3eac
to
e57d1c9
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! I have a few suggestions for improvements. Depending on your enthusiasm, go ahead as-is, or we do another round.
test/check-application
Outdated
@@ -2994,6 +3020,13 @@ class TestApplication(testlib.MachineCase): | |||
b.wait_visible(container_1_sel + " .ct-badge-toolbox:contains('toolbox')") | |||
b.wait_visible(container_2_sel + " .ct-badge-distrobox:contains('distrobox')") | |||
|
|||
if podman_version(self) >= (4, 4, 0): |
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'm not a big fan of this. If this goes wrong in any way, we'll silently skip the test everywhere. There should only be a few OSes which don't have that, and that list will shrink to zero in a controllable way. I.e. I'd prefer a if m.image not in [...]
list.
src/Containers.jsx
Outdated
@@ -211,14 +211,15 @@ const ContainerActions = ({ container, healthcheck, onAddNotification, localImag | |||
} | |||
} | |||
|
|||
const canRename = !isSystemdService && version.localeCompare("3", undefined, { numeric: true, sensitivity: 'base' }) >= 0; |
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.
Ugh -- this is old code, but it feels like we can drop this now? Our oldest OS Ubuntu 22.04 has podman 3.4
test/check-application
Outdated
@@ -2986,6 +2986,16 @@ WantedBy=multi-user.target default.target | |||
self.execute(auth, f"podman inspect --format '{{{{.Id}}}}' {container_name_new}").strip() | |||
self.waitContainerRow(container_name_new) | |||
|
|||
# service containers cannot be renamed | |||
if podman_version(self) >= (4, 4, 0): |
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.
Same "meh dynamic check" issue like above.
e57d1c9
to
f6e25ee
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!
test/check-application
Outdated
@@ -155,6 +155,7 @@ class TestApplication(testlib.MachineCase): | |||
self.has_criu = "debian" not in m.image and "ubuntu" not in m.image | |||
self.has_selinux = not any(img in m.image for img in ["arch", "debian", "ubuntu", "suse"]) | |||
self.has_cgroupsV2 = not m.image.startswith('rhel-8') | |||
self.supports_quadlet = not any(img in m.image for img in ["ubuntu-2204"]) |
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.
Ah sorry, debian stable has 4.3, so that needs to be excluded, too. But TBH I have troubles parsing this "three levels nested" loop. I think what it does is to compare each letter in "ubuntu-2204" against m.image, which really isn't what you want 😁
Could you just do
supports_quadlet = img not in ["debian-stable", "ubuntu-2204"]
please?
Quadlets and containers created by `podman generate systemd` are managed by systemd and treated more or less read-only in our UI. The first step is to show them different like we do with toolbox / distrobox containers.
Our lowest supported podman version is 3.4 on Ubuntu 22.04.
This is a footgun for users, the quadlet configuration determines the container name so allowing a user to rename a container would lead to an unknown state where the systemd service would name things different then the running container.
Running a healthcheck is automated in containers so this action does not need to be prominently advertised in our UI. The health detail tab still has a button to perform a healtcheck if the user is willing to do so manually.
f6e25ee
to
71165c3
Compare
This is a 3x affected flake and unrelated, so 👍 Thanks! |
Small steps into better supporting quadlets in cockpit-podman.
The visual changes are a new
service
label to identify quadlet/podman generate systemd managed containersOther changes are:
.container
file determines the name of the container allow users to change it will cause issues.