podman generate systemd
with added User=
directive for rootless container fails with PID file is not owned by root.
error
#12736
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Good morning Podman team. I have the following problem. Trying to run a Kafka pod (a part of the Kafka cluster) as rootless user, inside the container image is also running within rootless user (
UID=1001
). I manage host mounts permissions viapodman unshare
and take user namespaces into consideration. So far so good - no problems with that at all.I'd like to achieve the automatic restart of a pod when a machine reboots. In order to do that, I executed the following steps:
kafka
user vialoginctl enable-linger
podman generate systemd -n -f osm2dkafka1 --restart-policy=no -t 5
User=kafka
andGroup=kafka
directives to generated filespodman-kafka-pod
andpodman-kafka-container-kafka
) moved to/etc/systemd/system
sudo systemctl deamon-reload
and attempting to start apodman-kafka-pod
service.It fails with the following error:
When I first attempt to
systemctl restart podman-kafka-pod
, see the loop with results of presence ofPIDFile
s:So PIDFile is gone, same as
infra
container:PIDFile is recreated when I manually run
podman start cf4f6f
.Describe the results you received:
I've used
podman generate systemd
to generate a service unit file for a rootless container on rootless user. Tried creating system service for that by addingUser=
andGroup=
directives to generated files.Describe the results you expected:
I am not sure if it's possible to modify the service file to add
User/Group=
. I saw issue: #8504 and I know that I should probably create service files under my user $HOME directory and skipUser=
directives completely. I need a confirmation if that's what I should follow.Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
No
Additional environment details (AWS, VirtualBox, physical, etc.):
RHEL 8.4, FIPS enabled
The text was updated successfully, but these errors were encountered: