-
Notifications
You must be signed in to change notification settings - Fork 540
podman-compose how to support other host's mount device #787
-
i tried to change the docker-compose to podman-compose
before the yaml file has the shared volumes like this
volumes:
test-data-nfs:
driver: local
driver_opts:
type: nfs
o: addr=10.0.148.162,ro,nolock,nosuid,nodev
device: :/test_data
the two services use it
tty: true
stdin_open: true
security_opt:
- label:disable
privileged is required by running podman in container
privileged: true
volumes:
- .:/code
- brewroot-prod-nfs:/mnt/redhat:ro,nocopy
- containers:/var/lib/containers:Z
- test-data-nfs:/mnt/test_data:ro,nocopy
working_dir: /code
command: /bin/bash
but when start it, it will display
Error: unable to start container "713a907311297cf0b801bf11d583521f164777743a297d626f86b1e25bd49c3d": mounting volume pub-test_test-data-nfs for container 713a907311297cf0b801bf11d583521f164777743a297d626f86b1e25bd49c3d: mount.nfs: Failed to resolve server : Name or service not known
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments
-
the whole log display like
podman run --name=pub-test_tester_1 -d --security-opt label:disable --label io.podman.compose.config-hash=383858cdb12923a1e0ba20e3adae0ac6f1624f5a74f3f8545c6127b1796bf8be --label io.podman.compose.project=pub-test --label io.podman.compose.version=1.0.6 --label PODMAN_SYSTEMD_UNIT=podman-compose@pub-test.service --label com.docker.compose.project=pub-test --label com.docker.compose.project.working_dir=/home/fedora/pub-test --label com.docker.compose.project.config_files=docker-compose.yaml --label com.docker.compose.container-number=1 --label com.docker.compose.service=tester -e PUB_ENV=QA_CI -e AKAMAI_DIR=/461275/rcm/test -e DEST_QUAY_API_TOKEN=mi1jEjq3jmbjHV73xvNHC5aUzsi1G9CfJMPW9oD2 -e CGW_PASSWORD=Sgpljtl_fFmn -e USER=root -e REQUESTS_CA_BUNDLE=/etc/pki/tls/cert.pem -v /home/fedora/pub-test:/code -v pub-test_brewroot-prod-nfs:/mnt/redhat:ro -v pub-test_containers:/var/lib/containers:Z -v pub-test_test-data-nfs:/mnt/test_data:ro --net pub-test_default --network-alias tester -w /code -i --tty --privileged images.paas.redhat.com/exd-sp-guild-distribution/ci-tester:latest /bin/bash
Error: mounting volume pub-test_brewroot-prod-nfs for container 46fba47d74051c6993060dcc44267e0e8548c549bcf5198abefc6560269cd095: mount.nfs: Operation not permitted for ntap-bos-c01-eng01-nfs01b.storage.bos.redhat.com:/devops_engineering_nfs/devarchive/redhat on /home/fedora/.local/share/containers/storage/volumes/pub-test_brewroot-prod-nfs/_data
exit code: 126
podman start pub-test_tester_1
Error: unable to start container "46fba47d74051c6993060dcc44267e0e8548c549bcf5198abefc6560269cd095": mounting volume pub-test_brewroot-prod-nfs for container 46fba47d74051c6993060dcc44267e0e8548c549bcf5198abefc6560269cd095: mount.nfs: Operation not permitted for ntap-bos-c01-eng01-nfs01b.storage.bos.redhat.com:/devops_engineering_nfs/devarchive/redhat on /home/fedora/.local/share/containers/storage/volumes/pub-test_brewroot-prod-nfs/_data
exit code: 125
i tried to debug
[fedora@fedora-38 ~]$ podman info |grep network
networkBackend: netavark
networkBackendInfo:
network:
and during build the image, also add cap_add sys_admin, but it still doesn't work
Beta Was this translation helpful? Give feedback.
All reactions
-
I've got pretty much the same problem and havent' been able to find any documentation the last two days looking on how to make it all work. I defined my nfs volumes in my docker-compose.yml and then when I podman-compose up -d it I get the same above error.
Beta Was this translation helpful? Give feedback.