Various podman errors from volume mount when running Prometheus Container
by JockVSJock from LinuxQuestions.org on (#5M1AE)
I have more experience with Docker then say Podman and I'm not sure if there is a way to reference the various error messages that I'm getting.
I've pulled the latest Prometheus image from Red Hat's registry.access.redhat.com. I'm trying to create a volume and run the container with SUDO privileges (I've also tried to run this as rootless as well). The prometheus.yml file is under a regular user's directory and have 755 octal permissions. When I do, I get a number of errors:
Code:[user_x@host_yyz ~]$ sudo podman run -d -v ./prometheus.yml:/etc/prometheus/prometheus.yml --name project_prometheus
registry.access.redhat.com/openshift3/prometheus:latest
Error: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"rootfs_linux.go:58: mounting \\\"/var/lib/containers/storage/overlay-containers/f71e5b5de85af6b1970929b5500e4be061f8cb2f2d706fd0ac8efe678c48def9/userdata/prometheus.yml\\\" to rootfs \\\"/var/lib/containers/storage/overlay/c7a9e056636e9cc0add72176d95bff854f8d18718718e93933a59ba7a8963ae0/merged\\\" at \\\"/etc/prometheus/prometheus.yml\\\" caused \\\"stat /var/lib/containers/storage/overlay-containers/f71e5b5de85af6b1970929b5500e4be061f8cb2f2d706fd0ac8efe678c48def9/userdata/prometheus.yml: no such file or directory\\\"\""
: OCI runtime error
[user_x@host_yyz ~]$I've tried to reference container_linux.go:345 and process_linux.go:430 and rootfs_linux.go:58 and have come up to dead ends.
However if I run the same container from the same image without the volume flags, the container starts up without issues:
Code:[user_x@host_yyz ~]$ sudo podman run -d --name project_prometheus registry.access.redhat.com/openshift3/prometheus
7782ee7a51c9e2e74acbf51830fd446da9d09da844c08abb2ab9de298424aaf2
[user_x@host_yyz ~]$ sudo podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7782ee7a51c9 registry.access.redhat.com/openshift3/prometheus:latest /bin/prometheus -... 4 seconds ago Up 3 seconds ago project_prometheus
I've pulled the latest Prometheus image from Red Hat's registry.access.redhat.com. I'm trying to create a volume and run the container with SUDO privileges (I've also tried to run this as rootless as well). The prometheus.yml file is under a regular user's directory and have 755 octal permissions. When I do, I get a number of errors:
Code:[user_x@host_yyz ~]$ sudo podman run -d -v ./prometheus.yml:/etc/prometheus/prometheus.yml --name project_prometheus
registry.access.redhat.com/openshift3/prometheus:latest
Error: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"rootfs_linux.go:58: mounting \\\"/var/lib/containers/storage/overlay-containers/f71e5b5de85af6b1970929b5500e4be061f8cb2f2d706fd0ac8efe678c48def9/userdata/prometheus.yml\\\" to rootfs \\\"/var/lib/containers/storage/overlay/c7a9e056636e9cc0add72176d95bff854f8d18718718e93933a59ba7a8963ae0/merged\\\" at \\\"/etc/prometheus/prometheus.yml\\\" caused \\\"stat /var/lib/containers/storage/overlay-containers/f71e5b5de85af6b1970929b5500e4be061f8cb2f2d706fd0ac8efe678c48def9/userdata/prometheus.yml: no such file or directory\\\"\""
: OCI runtime error
[user_x@host_yyz ~]$I've tried to reference container_linux.go:345 and process_linux.go:430 and rootfs_linux.go:58 and have come up to dead ends.
However if I run the same container from the same image without the volume flags, the container starts up without issues:
Code:[user_x@host_yyz ~]$ sudo podman run -d --name project_prometheus registry.access.redhat.com/openshift3/prometheus
7782ee7a51c9e2e74acbf51830fd446da9d09da844c08abb2ab9de298424aaf2
[user_x@host_yyz ~]$ sudo podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7782ee7a51c9 registry.access.redhat.com/openshift3/prometheus:latest /bin/prometheus -... 4 seconds ago Up 3 seconds ago project_prometheus