-
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
podman-restart.service doesn't like x-systemd.automount #19766
Comments
@vrothberg PTAL |
This needs triaging which can be done by anyone, so please don´t wait/block on me to work on it. |
Seems like podman-restart.service should probably wait for all file systems to be mounted before firing off. |
That is what I would recommend as well. For
Now that is interesting. I will investigate. |
That is likely a separate issue. If it persists, please open a new issue for this symptom. |
I am an unable to reproduce this symptom. I suspected that there may be issues when starting one container failed to start but the other containers happily continue running. |
@urbenlegend any chance you can break it down into another reproducer? |
Actually, I think that's expected behavior with the The beauty of using
Filed #19815 |
Ah, thank you. I misinterpreted the statement 👍
That is interesting. So Docker is capable of starting a container whos mounts are not yet there? |
It will just wait due to x-systemd.automount. I am assuming it just simply attempts to access the filesystem, but systemd-automount will make anything that does so pause until the filesystem is actually mounted. |
I would expect podman to do the same thing. systemd is just making the file system seem like it is mounted and then mounting the file system on first access. Nothing in Docker or Podman should be required that I know of to use this type of service. If Podman is complaining about this, it would be nice to see the logs. |
@rhatdan I share this impression. Couldn't find anything in Docker that would suggest a custom logic. |
@rhatdan, I've already uploaded the relevant logs in the original bug report. A bunch of
gets spit out and then it finally fails to start the container. |
Is /external/share a symbolic link? |
It isn't, just a regular BTRFS external USB drive with the following mount options:
EDIT: whoops thats the workaround options, heres the original systemd.automount
|
I see absolutely no evidence in the Docker code that Docker would wait for such mounts, so I am pretty sure Docker errors out as well. It's probably just lucky timing on boot. I don't think there is much Podman can do, and believe that the mentioned solutions to use systemd's dependency management is the right thing to do. Hence, I will close the issue. Please speak up if you feel different. |
Issue Description
Some of my containers aren’t getting started up by
podman-restart.service
on system reboot. After looking through the logs, I realized they were the ones that depended on my slow USB external BTRFS drive, which is mounted withx-systemd.automount,x-systemd.device-timeout=10
so that it doesn’t hang up the boot if I disconnect it.It seems like Podman doesn’t like this however:
This eventually causes the container to not start up, which then causes
podman-restart.service
to fail:Once the system gets into this state, shutting down the system then leads to a delayed shutdown with the exact same logs seen in this bug that's supposedly fixed: #14434
Temporary workaround: I've been mounting with
nofail,x-systemd.before=podman-restart.service
instead which seems to work okay, except that if the drive isn't connected, ALL of my containers do not start up, instead of just the ones that depend on the external mount.Steps to reproduce the issue
Steps to reproduce the issue
/external/share
.always
and enablepodman-restart.service
Describe the results you received
Container fails to wait for systemd automount to complete and instead refuses to start. Shutdown also becomes delayed due to some lingering podman services
Describe the results you expected
Container waits for systemd automount to complete before starting up.
podman info output
Podman in a container
No
Privileged Or Rootless
Privileged
Upstream Latest Release
Yes
Additional environment details
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: