Closed pragmatiker closed 1 year ago
@ygalblum PTAL
So I think I found the cause. I had a shell variable for $HOME in the path of "Volume=" inside the .conainer file. If i use the absolut path, it pulls the image correctly.
[Unit]
Description=Neo4j container
TimeoutStartSec=900
[Container]
Image=docker.io/library/neo4j:latest
ContainerName=neo4j-poc
PublishPort=7474:7474
Volume=/home/neo4j/neo4j/data:/data
#Volume=$HOME/neo4j/data:/data
[Service]
Restart=always
[Install]
WantedBy=default.target
I am now left with another error, regarding CGROUPS, that is a different story I guess
Okt 13 07:38:29 PTSEKM021 systemd[2109]: Starting Neo4j container...
Okt 13 07:38:29 PTSEKM021 podman[17639]: 2023-10-13 07:38:29.357628786 +0200 CEST m=+0.032026876 volume create 72f368eb94209a53caa03a17b669d0d81052f49e01d0a0eaceb088fa80fbc7d3
Okt 13 07:38:29 PTSEKM021 podman[17639]: 2023-10-13 07:38:29.362462777 +0200 CEST m=+0.036860866 container create 46f8b5212972cfa391896c8cc025bb6ed6898c77dadc3c19e4f0ceb69dec3eee (image=docker.io/library/neo4j:latest, name=neo4j-poc, PO>
Okt 13 07:38:29 PTSEKM021 neo4j[17639]: time="2023-10-13T07:38:29+02:00" level=warning msg="Path \"/etc/zypp/credentials.d/SCCcredentials\" from \"/etc/containers/mounts.conf\" doesn't exist, skipping"
Okt 13 07:38:29 PTSEKM021 podman[17639]: 2023-10-13 07:38:29.405693022 +0200 CEST m=+0.080091134 container remove 46f8b5212972cfa391896c8cc025bb6ed6898c77dadc3c19e4f0ceb69dec3eee (image=docker.io/library/neo4j:latest, name=neo4j-poc, PO>
Okt 13 07:38:29 PTSEKM021 podman[17639]: 2023-10-13 07:38:29.407014127 +0200 CEST m=+0.081412216 volume remove 72f368eb94209a53caa03a17b669d0d81052f49e01d0a0eaceb088fa80fbc7d3
Okt 13 07:38:29 PTSEKM021 podman[17639]: 2023-10-13 07:38:29.346655934 +0200 CEST m=+0.021054033 image pull docker.io/library/neo4j:latest
Okt 13 07:38:29 PTSEKM021 neo4j[17639]: Error: mkdir /sys/fs/cgroup/devices/user.slice/runtime: permission denied
Okt 13 07:38:29 PTSEKM021 systemd[2109]: neo4j.service: Main process exited, code=exited, status=126/n/a
Okt 13 07:38:29 PTSEKM021 systemd[2109]: neo4j.service: Killing process 17653 (slirp4netns) with signal SIGKILL.
Okt 13 07:38:29 PTSEKM021 systemd[2109]: neo4j.service: Killing process 17655 (rootlessport) with signal SIGKILL.
Okt 13 07:38:29 PTSEKM021 systemd[2109]: neo4j.service: Killing process 17666 (exe) with signal SIGKILL.
Okt 13 07:38:29 PTSEKM021 systemd[2109]: neo4j.service: Failed with result 'exit-code'.
Okt 13 07:38:29 PTSEKM021 systemd[2109]: Failed to start Neo4j container.
First, systemd does not expand $var variables and just removes the full arg.
[Service]
ExecStart=echo $HOME/test abc 123
The correct way is to use specifiers: https://www.freedesktop.org/software/systemd/man/systemd.unit.html#Specifiers
For some reason this works: ExecStart=echo ${HOME}/test abc 123
but I couldn't find that documented anywhere so I wouldn't use that.
quadlet does not support cgroupv1 systems, you have to use cgroupv2
Issue Description
Not all parameters of the ExecStart from the generated service UNIT seem to be used. At least to me, it seems "docker.io/library/neo4j:latest" gets ommitted and "7474:7474" get treated as the last.
Steps to reproduce the issue
My container UNIT looks like this:
The generated service UNIT looks like this:
Describe the results you received
In journalctl I see the following Podman appends the value of PublishPort=7474:7474 to the registry URL instead of Image=docker.io/library/neo4j:latest
Describe the results you expected
Since running this from the command line flawlessly, I think my installation of Podman is ussable. Just running from systemd seems to cut off the last bit.
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
No
Additional environment details
SLES15 running in VMWare Hypervisor
Additional information
Image=docker.io/library/neo4j:latest