volume mount error with podman 3.x #10620
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
Running elasticsearch on 3.x has several volume mount issues while it worked on 2.x
Steps to reproduce the issue:
create docker-compose.yml with elasticsearch
volumes:
esdata:
driver: local
driver_opts:
o: "uid=1000"
services:
elasticsearch:
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:7.13.1
cpu_quota: 100000
mem_limit: 8g
environment:
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- esdata:/usr/share/elasticsearch/data:Z
- "/etc/opt/logging/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml"
expose:
ports:
restart:
"always"
install docker-compose now that using podman 3.x
docker-compose up
Describe the results you received:
ERROR: for elasticsearch error preparing container 1b9a4386df255f7c4fafba479653878efcaf07d4c55eb5b9a2c422163a543c4b for attach: error mounting volume logging_esdata for container 1b9a4386df255f7c4fafba479653878efcaf07d4c55eb5b9a2c422163a543c4b: error mounting volume logging_esdata: mount: /var/lib/containers/storage/volumes/logging_esdata/_data: wrong fs type, bad option, bad superblock on , missing codepage or helper program, or other error.
Describe the results you expected:
should mount the volume properly so that elasticsearch can start
Additional information you deem important (e.g. issue happens only occasionally):
podman volume inspect
with podman 2.x
[
{
"Name": "cos-logging_esdata",
"Driver": "local",
"Mountpoint": "/var/lib/containers/storage/volumes/cos-logging_esdata/_data",
"CreatedAt": "2021-03-26T12:14:02.942197434-04:00",
"Labels": {
"io.podman.compose.project": "cos-logging"
},
"Scope": "local",
"Options": {
]
podman 3.x
[
{
"Name": "logging_esdata",
"Driver": "local",
"Mountpoint": "/var/lib/containers/storage/volumes/logging_esdata/_data",
"CreatedAt": "2021-06-09T09:15:10.556205958-07:00",
"Labels": {
"com.docker.compose.project": "logging",
"com.docker.compose.version": "1.29.2",
"com.docker.compose.volume": "esdata"
},
"Scope": "local",
"Options": {
"UID": "1000",
"o": "uid=1000"
},
"UID": 1000
}
]
had to add uid info in podman 3.x or elasticsearch has permissions error
this makes the dir look like it does for podman 2.x
drwxrwxr-x 3 1000 root 19 Mar 26 12:14 _data
Workaround is to create the volume through podman volume create and then in docker-compose have:
volumes:
- /var/lib/containers/storage/volumes/logging_esdata/_data:/usr/share/elasticsearch/data:Z
instead of
volumes:
- esdata:/usr/share/elasticsearch/data:Z
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)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
physical
The text was updated successfully, but these errors were encountered: