-
Notifications
You must be signed in to change notification settings - Fork 2.6k
systemd service pod fails to start after update to v5.4.1 #25786
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
Comments
I guess I should note that the pod that I am demonstrating above is not my actual usage scenario. I just wanted to make sure that I provided an example that was as simple as possible while still showing the issue. |
Why do you run a k8s yaml without any containers? Is that even valid in the k8s context? I would assume 945aade caused this regression so it is likely something we should fix. |
One case could be a PVC as explained in the documentation: https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html#service-type
Yes, the think the code should also check if any containers were intended to be executed |
Well yes and I assume my patch still allows for it. I am just confused about the example yaml here which declares a pod without any container? Because the service container is only setup when there are pods to be started.
yeah, though the entire kube play code is such a mess that is rather hard to make simple changes without such unintended consequences |
Yes. Another way is how I have been using the combination of .kube and .container files. I feel like this gives me a simpler configuration compared to having to stuff the entire configuration into the .yaml file especially when the number of containers is large. For example, an nginx container running in a sites pod:
|
Is my approach wrong and I have just been "lucky" up to this point that it has worked? |
@wdouglascampbell Any reason you are not using [Pod] units for that? https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html#pod-units-pod That is what they are designed for and then in the container unit use
That also takes care of the dependency management. That said if this worked before and my patch broke it then we will fix it again. We are committed to provide a stable experience as we follow semver https://semver.org/. I am not sure if "lucky" is the right word. That is simply something I didn't knew was possible and we didn't seem to have any tests for it either. Once I fix it we can add a regression test for an empty pod yaml. |
I can only claim ignorance as I continue to learn, but appreciate the link. I will definitely take a look.
Awesome. Much appreciated. |
Since commit 945aade we do tear down the kube units if all pods failed to start. This however broke the use case of an empty pod as we did not consider that being starting successfully which is wrong and caused a regression for at least one user. To fix this special case the empty pod and consider that running. Fixes: containers#25786 Fixes: 945aade ("quadlet kube: correctly mark unit as failed") Signed-off-by: Paul Holzinger <[email protected]>
#25796 should fix it |
Issue Description
I have a number of pods that I have configured to start and run containers within them. I have used the Quadlet approach to defining both the containers and the pod. After I updated to using podman v5.4.1 I am no longer able to successfully start those systemd services that runs the pod.
Steps to reproduce the issue
Steps to reproduce the issue
First set things up and run using Podman v5.4.0
Create
~/.config/containers/systemd/pod-test.kube
with the following content:Create
~/.config/containers/systemd/pod-test.yaml
with the following content:Run pod.
This results in no errors and the output of
podman ps
is:Update to Podman v5.4.1 and try again
After rebooting, you will notice that the output of
podman ps
is:Attempting to restart the pod.
Results in the following error:
and the results of
journalctl --user -xeu pod-test.service --no-pager
are as follows:Describe the results you received
errors
Describe the results you expected
a running pod with no errors like in the previous versions of Podman.
podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
Ran into the issue on two separate Fedora CoreOS servers and a VM running Fedora CoreOS.
Additional information
I noticed that if I force the Service Type= to forking instead of notify that I can get things running mostly. The service container for the pod fails but everything else runs.
The text was updated successfully, but these errors were encountered: