storage
storage copied to clipboard
Built podman does not seem to respect ETCDIR.
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Failing to build podman so that it respects ETCDIR=$INSTALL_PREFIX/etc
Steps to reproduce the issue:
make BUILDTAGS="selinux seccomp systemd" && \make install PREFIX=/opt/podman-4.0.2 ETCDIR=/opt/podman-4.0.2/etcfind /opt/podman-4.0.2/etc/opt/podman-4.0.2/etc /opt/podman-4.0.2/etc/containers /opt/podman-4.0.2/etc/containers/registries.conf /opt/podman-4.0.2/etc/containers/policy.json /opt/podman-4.0.2/etc/containers/containers.conf
Describe the results you received:
/opt/podman-4.0.2/bin/podman system migrate
Error: could not find a working conmon binary (configured options: [/usr/libexec/podman/conmon /usr/local/libexec/podman/conmon /usr/local/lib/podman/conmon /usr/bin/conmon /usr/sbin/conmon /usr/local/bin/conmon /usr/local/sbin/conmon /run/current-system/sw/bin/conmon]): invalid argument
But
pbeckm@sv2218:/opt/podman-4.0.2> cp -ar etc/containers /etc/
cp: cannot create directory '/etc/containers': Permission denied
pbeckm@sv2218:/opt/podman-4.0.2> sudo cp -ar etc/containers /etc/
[sudo] password for beckmann:
pbeckm@sv2218:/opt/podman-4.0.2> /opt/podman-4.0.2/bin/podman system migrate
pbeckm@sv2218:/opt/podman-4.0.2>
Describe the results you expected:
I'd like to know a way to have separate etc-directories for each installed podman-version.
Additional information you deem important (e.g. issue happens only occasionally):
Output of podman version:
podman version 4.0.2
Output of podman info --debug:
opt/podman-4.0.2/bin/podman info --debug
host:
arch: amd64
buildahVersion: 1.24.1
cgroupControllers:
- memory
- pids
cgroupManager: systemd
cgroupVersion: v2
conmon:
package: Unknown
path: /opt/podman-4.0.2/libexec/podman/conmon
version: 'conmon version 2.1.0, commit: 781e16c8653af07a34ea7e423971d1d153728004'
cpus: 52
distribution:
codename: bullseye
distribution: debian
version: "11"
eventLogger: journald
hostname: sv2218
idMappings:
gidmap:
- container_id: 0
host_id: 1000
size: 1
- container_id: 1
host_id: 100000
size: 65536
uidmap:
- container_id: 0
host_id: 1000
size: 1
- container_id: 1
host_id: 100000
size: 65536
kernel: 5.10.0-13-amd64
linkmode: dynamic
logDriver: journald
memFree: 258320269312
memTotal: 270468505600
networkBackend: cni
ociRuntime:
name: runc
package: Unknown
path: /opt/podman-3.4.4/sbin/runc
version: |-
runc version 1.1.0+dev
commit: v1.1.0-42-gede71278
spec: 1.0.2-dev
go: devel go1.18-867a3d5502 Mon Feb 7 12:32:51 2022 +0000
libseccomp: 2.5.1
os: linux
remoteSocket:
path: /run/user/1000/podman/podman.sock
security:
apparmorEnabled: false
capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
rootless: true
seccompEnabled: true
seccompProfilePath: ""
selinuxEnabled: false
serviceIsRemote: false
slirp4netns:
executable: ""
package: ""
version: ""
swapFree: 10011799552
swapTotal: 10011799552
uptime: 4h 31m 12.22s (Approximately 0.17 days)
plugins:
log:
- k8s-file
- none
- passthrough
- journald
network:
- bridge
- macvlan
- ipvlan
volume:
- local
registries:
search:
- registry.fedoraproject.org
- registry.access.redhat.com
- docker.io
- quay.io
store:
configFile: /home/beckmann/.config/containers/storage.conf
containerStore:
number: 0
paused: 0
running: 0
stopped: 0
graphDriverName: vfs
graphOptions: {}
graphRoot: /home/beckmann/.local/share/containers/storage
graphStatus: {}
imageCopyTmpDir: /var/tmp
imageStore:
number: 9
runRoot: /run/user/1000/containers
volumePath: /home/beckmann/.local/share/containers/storage/volumes
version:
APIVersion: 4.0.2
Built: 1648815392
BuiltTime: Fri Apr 1 14:16:32 2022
GitCommit: ""
GoVersion: devel go1.18-867a3d5502 Mon Feb 7 12:32:51 2022 +0000
OsArch: linux/amd64
Version: 4.0.2
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Thanks for reaching out, @pbeckm!
I'd like to know a way to have separate etc-directories for each installed podman-version.
Such a functionality does not exist in Podman. May I ask about your motivation to have a separate /etc?
Thanks for the swift reply. We'd like to employ podman in a HPC cluster setting. Since it might be necessary to experiment with different versions of podman (and if need be, runc and conmon), having separate config dirs could be handy. The other reason is that /opt, i.e. the installation directory for podman et al, is exported via NFS to all worker nodes, but not /etc. So my question was mainly just a matter of convenience and curiosity. Thanks again. I'll work around it.
This would be a very invasive change and might reach down into lower level libraries. For such a change to happen, I think it would have to come from community and work through the entire stack.
We'd probably need a package in c/storage with a global variable GlobalRoot (or something similar) which is an empty string by default. It can then be set at build-time. Other go packages in the stack can use it as a prefix in locations dealing with config files etc.
A friendly reminder that this issue had no activity for 30 days.
A friendly reminder that this issue had no activity for 30 days.