automation-tests/libpod
Valentin Rothberg a090301bbb podman cp: support copying on tmpfs mounts
Traditionally, the path resolution for containers has been resolved on
the *host*; relative to the container's mount point or relative to
specified bind mounts or volumes.

While this works nicely for non-running containers, it poses a problem
for running ones.  In that case, certain kinds of mounts (e.g., tmpfs)
will not resolve correctly.  A tmpfs is held in memory and hence cannot
be resolved relatively to the container's mount point.  A copy operation
will succeed but the data will not show up inside the container.

To support these kinds of mounts, we need to join the *running*
container's mount namespace (and PID namespace) when copying.

Note that this change implies moving the copy and stat logic into
`libpod` since we need to keep the container locked to avoid race
conditions.  The immediate benefit is that all logic is now inside
`libpod`; the code isn't scattered anymore.

Further note that Docker does not support copying to tmpfs mounts.

Tests have been extended to cover *both* path resolutions for running
and created containers.  New tests have been added to exercise the
tmpfs-mount case.

For the record: Some tests could be improved by using `start -a` instead
of a start-exec sequence.  Unfortunately, `start -a` is flaky in the CI
which forced me to use the more expensive start-exec option.

Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2021-03-04 15:43:12 +01:00
..
common Set blob cache directory based on GraphDriver 2019-03-29 08:27:33 -04:00
define podman cp: support copying on tmpfs mounts 2021-03-04 15:43:12 +01:00
driver bump go module to v3 2021-02-22 09:03:51 +01:00
events bump go module to v3 2021-02-22 09:03:51 +01:00
image podman rmi: handle corrupted storage better 2021-03-01 09:52:03 +01:00
layers Initial checkin from CRI-O repo 2017-11-01 11:24:59 -04:00
linkmode Add podman static build 2020-05-11 13:11:07 +02:00
lock bump go module to v3 2021-02-22 09:03:51 +01:00
logs bump go module to v3 2021-02-22 09:03:51 +01:00
network Fix podman network IDs handling 2021-02-22 15:51:49 +01:00
plugin bump go module to v3 2021-02-22 09:03:51 +01:00
shutdown Ensure shutdown handler access is syncronized 2021-01-25 15:44:42 -05:00
boltdb_state.go Rewrite Rename backend in a more atomic fashion 2021-03-02 13:30:28 -05:00
boltdb_state_internal.go bump go module to v3 2021-02-22 09:03:51 +01:00
boltdb_state_linux.go bump go module to v3 2021-02-22 09:03:51 +01:00
boltdb_state_unsupported.go podman-remote inspect 2019-01-18 15:43:11 -06:00
common_test.go bump go module to v3 2021-02-22 09:03:51 +01:00
container.go podman cp: support copying on tmpfs mounts 2021-03-04 15:43:12 +01:00
container_api.go podman cp: support copying on tmpfs mounts 2021-03-04 15:43:12 +01:00
container_commit.go bump go module to v3 2021-02-22 09:03:51 +01:00
container_config.go bump go module to v3 2021-02-22 09:03:51 +01:00
container_copy_linux.go podman cp: support copying on tmpfs mounts 2021-03-04 15:43:12 +01:00
container_copy_unsupported.go podman cp: support copying on tmpfs mounts 2021-03-04 15:43:12 +01:00
container_exec.go prune remotecommand dependency 2021-02-25 10:02:41 -06:00
container_graph.go bump go module to v3 2021-02-22 09:03:51 +01:00
container_graph_test.go bump go module to v3 2021-02-22 09:03:51 +01:00
container_inspect.go Sort CapDrop in inspect to guarantee order 2021-02-23 14:05:18 -05:00
container_internal.go podman cp: support copying on tmpfs mounts 2021-03-04 15:43:12 +01:00
container_internal_linux.go Use functions and defines from checkpointctl 2021-03-02 17:00:06 +00:00
container_internal_linux_test.go Make an entry in /etc/group when we modify /etc/passwd 2020-09-10 13:02:31 -04:00
container_internal_test.go Refactor container config 2020-07-23 10:18:14 -04:00
container_internal_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
container_linux.go Do not fetch pod and ctr State on retrieval in Bolt 2018-07-31 14:19:50 +00:00
container_log.go Tidy duplicate log tests 2021-03-02 14:28:16 -05:00
container_log_linux.go Tidy duplicate log tests 2021-03-02 14:28:16 -05:00
container_log_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
container_path_resolution.go podman cp: support copying on tmpfs mounts 2021-03-04 15:43:12 +01:00
container_stat_linux.go podman cp: support copying on tmpfs mounts 2021-03-04 15:43:12 +01:00
container_stat_unsupported.go podman cp: support copying on tmpfs mounts 2021-03-04 15:43:12 +01:00
container_top_linux.go bump go module to v3 2021-02-22 09:03:51 +01:00
container_top_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
container_unsupported.go Do not fetch pod and ctr State on retrieval in Bolt 2018-07-31 14:19:50 +00:00
container_validate.go bump go module to v3 2021-02-22 09:03:51 +01:00
diff.go bump go module to v3 2021-02-22 09:03:51 +01:00
events.go bump go module to v3 2021-02-22 09:03:51 +01:00
healthcheck.go bump go module to v3 2021-02-22 09:03:51 +01:00
healthcheck_linux.go bump go module to v3 2021-02-22 09:03:51 +01:00
healthcheck_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
in_memory_state.go Rewrite Rename backend in a more atomic fashion 2021-03-02 13:30:28 -05:00
info.go bump go module to v3 2021-02-22 09:03:51 +01:00
kube.go bump go module to v3 2021-02-22 09:03:51 +01:00
mounts_linux.go set root propagation based on volume properties 2018-11-26 13:55:02 +01:00
networking_linux.go Network connect error if net mode is not bridge 2021-02-23 22:30:04 +01:00
networking_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
oci.go prune remotecommand dependency 2021-02-25 10:02:41 -06:00
oci_attach_linux.go prune remotecommand dependency 2021-02-25 10:02:41 -06:00
oci_attach_unsupported.go prune remotecommand dependency 2021-02-25 10:02:41 -06:00
oci_conmon.go podman: add new cgroup mode split 2020-06-25 17:16:12 +02:00
oci_conmon_exec_linux.go prune remotecommand dependency 2021-02-25 10:02:41 -06:00
oci_conmon_linux.go Move checkpoint/restore code to pkg/checkpoint/crutils 2021-03-02 17:00:06 +00:00
oci_conmon_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
oci_missing.go prune remotecommand dependency 2021-02-25 10:02:41 -06:00
oci_util.go bump go module to v3 2021-02-22 09:03:51 +01:00
options.go Add U volume flag to chown source volumes 2021-02-22 22:55:19 -06:00
pod.go bump go module to v3 2021-02-22 09:03:51 +01:00
pod_api.go bump go module to v3 2021-02-22 09:03:51 +01:00
pod_internal.go bump go module to v3 2021-02-22 09:03:51 +01:00
pod_status.go bump go module to v3 2021-02-22 09:03:51 +01:00
pod_top_linux.go bump go module to v3 2021-02-22 09:03:51 +01:00
pod_top_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
reset.go bump go module to v3 2021-02-22 09:03:51 +01:00
rootless_cni_linux.go Correct compat images/create?fromImage response 2021-02-26 03:08:10 +01:00
runtime.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_cstorage.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_ctr.go Rewrite Rename backend in a more atomic fashion 2021-03-02 13:30:28 -05:00
runtime_img.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_img_test.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_migrate.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_migrate_unsupported.go Use Libpod tmpdir for pause path 2020-12-02 14:18:37 -05:00
runtime_pod.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_pod_infra_linux.go Correct compat images/create?fromImage response 2021-02-26 03:08:10 +01:00
runtime_pod_linux.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_pod_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_renumber.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_volume.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_volume_linux.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_volume_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
state.go Rewrite Rename backend in a more atomic fashion 2021-03-02 13:30:28 -05:00
state_test.go bump go module to v3 2021-02-22 09:03:51 +01:00
stats.go bump go module to v3 2021-02-22 09:03:51 +01:00
stats_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
storage.go bump go module to v3 2021-02-22 09:03:51 +01:00
util.go bump go module to v3 2021-02-22 09:03:51 +01:00
util_linux.go bump go module to v3 2021-02-22 09:03:51 +01:00
util_linux_test.go Fix mismatch between log messages and behavior of libpod.LabelVolumePath. 2020-09-13 23:24:15 -04:00
util_test.go bump go module to v3 2021-02-22 09:03:51 +01:00
util_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
volume.go bump go module to v3 2021-02-22 09:03:51 +01:00
volume_inspect.go bump go module to v3 2021-02-22 09:03:51 +01:00
volume_internal.go bump go module to v3 2021-02-22 09:03:51 +01:00
volume_internal_linux.go bump go module to v3 2021-02-22 09:03:51 +01:00
volume_internal_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00