podman: podman cannot mount volumes with external symlinks
/kind bug
Description
Podman volumes with external symlinks does not seem to be mountable
Steps to reproduce the issue:
-
Create volume with symlink which references files outside of the volume. For example symbolic link to …/foo
-
Try to mount the volume.
-
Volume does not mount
Describe the results you received: Volume fails to mount
Describe the results you expected:
Volume should mount, and when I enter the image, I should see the symbolic link point to the file within the context of the mounted volume. This is the behavior in docker. Also these sorts of symbolic links are very common in directory /etc which points to /usr/share or to other directories outside the volume
Error: unable to start container 34e9c7636cd474d63741b93ecbd0dabfcab44aad263cedac4b4aa65ef93c5460: error copying content from container 34e9c7636cd474d63741b93ecbd0dabfcab44aad263cedac4b4aa65ef93c5460 into volume demo_etc: invalid symlink “/home/joe/.local/share/containers/storage/volumes/demo_etc/_data/httpd/logs” -> “…/…/var/log/httpd”
Additional information you deem important (e.g. issue happens only occasionally):
Output of podman version:
[joe@big-apple bench]$ podman version
Version: 2.0.0-dev
RemoteAPI Version: 1
Go Version: go1.14.2
OS/Arch: linux/amd64
**Output of `podman info --debug`:**
[joe@big-apple SPECS]$
configFile: /home/joe/.config/containers/storage.conf
containerStore:
number: 9
paused: 0
running: 5
stopped: 4
graphDriverName: vfs
graphOptions: {}
graphRoot: /home/joe/.local/share/containers/storage
graphStatus: {}
imageStore:
number: 36
runRoot: /run/user/1000/containers
volumePath: /home/joe/.local/share/containers/storage/volumes
version:
Built: 0
GitCommit: ""
GoVersion: go1.14.2
OsArch: linux/amd64
RemoteAPIVersion: 1
Version: 2.0.0-dev
Package info (e.g. output of rpm -q podman or apt list podman):
podman-2.0.0-0.1.dev.git8857ba2.mga8
Additional environment details (AWS, VirtualBox, physical, etc.):
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 22 (12 by maintainers)
Commits related to this issue
- use shutil rather than tar for copy fix #6003 This patch uses termie/go-shutil to copy containers rather than tar. The problem with tar is that it does not copy symlinks pointing outside of the volu... — committed to joequant/libpod by joequant 4 years ago
- use internal copy rather than tar for copy fix #6003 This patch uses internal copy to copy containers rather than tar. The problem with tar is that it does not copy symlinks pointing outside of the ... — committed to joequant/libpod by joequant 4 years ago
- use internal copy rather than tar for copy fix #6003 This patch uses internal copy to copy containers rather than tar. The problem with tar is that it does not copy symlinks pointing outside of the ... — committed to joequant/libpod by joequant 4 years ago
- use internal copy rather than tar for copy fix #6003 This patch uses internal copy to copy containers rather than tar. The problem with tar is that it does not copy symlinks pointing outside of the ... — committed to joequant/libpod by joequant 4 years ago
- use internal copy rather than tar for copy fix #6003 This patch uses internal copy to copy containers rather than tar. The problem with tar is that it does not copy symlinks pointing outside of the ... — committed to joequant/libpod by joequant 4 years ago
- use internal copy rather than tar for copy fix #6003 This patch uses internal copy to copy containers rather than tar. The problem with tar is that it does not copy symlinks pointing outside of the ... — committed to joequant/libpod by joequant 4 years ago
- use internal copy rather than tar for copy fix #6003 This patch uses internal copy to copy containers rather than tar. The problem with tar is that it does not copy symlinks pointing outside of the ... — committed to joequant/libpod by joequant 4 years ago
- use internal copy rather than tar for copy fix #6003 This patch uses internal copy to copy containers rather than tar. The problem with tar is that it does not copy symlinks pointing outside of the ... — committed to joequant/libpod by joequant 4 years ago
- Rewrite copy-up to use buildah Copier The old copy-up implementation was very unhappy with symlinks, which could cause containers to fail to start for unclear reasons when a directory we wanted to co... — committed to mheon/libpod by mheon 3 years ago
- Rewrite copy-up to use buildah Copier The old copy-up implementation was very unhappy with symlinks, which could cause containers to fail to start for unclear reasons when a directory we wanted to co... — committed to mheon/libpod by mheon 3 years ago
- Rewrite copy-up to use buildah Copier The old copy-up implementation was very unhappy with symlinks, which could cause containers to fail to start for unclear reasons when a directory we wanted to co... — committed to mheon/libpod by mheon 3 years ago
- Rewrite copy-up to use buildah Copier The old copy-up implementation was very unhappy with symlinks, which could cause containers to fail to start for unclear reasons when a directory we wanted to co... — committed to mheon/libpod by mheon 3 years ago
- Rewrite copy-up to use buildah Copier The old copy-up implementation was very unhappy with symlinks, which could cause containers to fail to start for unclear reasons when a directory we wanted to co... — committed to mheon/libpod by mheon 3 years ago
- Rewrite copy-up to use buildah Copier The old copy-up implementation was very unhappy with symlinks, which could cause containers to fail to start for unclear reasons when a directory we wanted to co... — committed to mheon/libpod by mheon 3 years ago
- Rewrite copy-up to use buildah Copier The old copy-up implementation was very unhappy with symlinks, which could cause containers to fail to start for unclear reasons when a directory we wanted to co... — committed to mheon/libpod by mheon 3 years ago
I imagine that reworking our copyup code to use Buildah’s
copierpackage should solve this.