-
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
User units and network-online.target #24796
Comments
https://systemd.io/NETWORK_ONLINE |
The targets and units of systemd are categorized into system and user, and network-online.target does not exist in user by default, which means that if you fill |
If you're using |
The truth is that I thought it could be a bug in Arch. I'm using
More info
And the list of packages and their versions in case it clarifies something:
|
Did you enable |
Yes:
|
What is the output of |
In my system where I use
In a virtual machine with a clean system using
In both cases the dependent service is enabled and inactive. |
Ok that is odd but this all is far outside of the control of podman I believe. Can you check
And
So I think if you have no other root service starting it it might never activate. I really wish we would not need to be in the business of that stuff but here we are until systemd/systemd#3312 is fixed. We need a work around it as rootless containers start without networking otherwise #22197 |
Therefore, as you say, there is no other (system) service that activates this target and therefore it remains inactive. |
So we may need a dummy system level service requires this target |
A dummy unit might not be required, enabling a service is just adding a symlink, adding a link like |
Creating a service like this and enabling it works:
|
Issue Description
When you try to start a user container using quadlet it by default depends on the unit
podman-user-wait-network-online.service
which in turn runsuntil systemctl is-active network-online.target; do sleep 0.5; done
. The problem is that (at least on Arch Linux) thenetwork-online.target
unit is not active and therefore thepodman-user-wait-network-online.service
unit always fails.Steps to reproduce the issue
Steps to reproduce the issue
.config/containers/systemd/
, for example:systemctl --user start ollama
journalctl --user -e
Describe the results you received
The system fails when trying to determine the network status. This happens because the
network-online.target
is not actually active:This however does not affect other units that depend on this target, for example with this user unit in
.config/systemd/user/test.service
:If we start it with
systemctl --user start test.service
it starts without problems.Describe the results you expected
There should be another way to determine if the network online target has been reached for the user. As far as I see systemd does it, but I don't know how.
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
It is a fully upgraded Arch Linux system.
Additional information
In the configuration of the container unit I have tried to put the following so that at least it would not try to execute the
podman-user-wait-network-online.service
.I don't know why but it still executes this dependency, maybe because my unit depends on some volumes?
The text was updated successfully, but these errors were encountered: