podman/libpod
Matthew Heon b53cb57680 Initial implementation of volume plugins
This implements support for mounting and unmounting volumes
backed by volume plugins. Support for actually retrieving
plugins requires a pull request to land in containers.conf and
then that to be vendored, and as such is not yet ready. Given
this, this code is only compile tested. However, the code for
everything past retrieving the plugin has been written - there is
support for creating, removing, mounting, and unmounting volumes,
which should allow full functionality once the c/common PR is
merged.

A major change is the signature of the MountPoint function for
volumes, which now, by necessity, returns an error. Named volumes
managed by a plugin do not have a mountpoint we control; instead,
it is managed entirely by the plugin. As such, we need to cache
the path in the DB, and calls to retrieve it now need to access
the DB (and may fail as such).

Notably absent is support for SELinux relabelling and chowning
these volumes. Given that we don't manage the mountpoint for
these volumes, I am extremely reluctant to try and modify it - we
could easily break the plugin trying to chown or relabel it.

Also, we had no less than *5* separate implementations of
inspecting a volume floating around in pkg/infra/abi and
pkg/api/handlers/libpod. And none of them used volume.Inspect(),
the only correct way of inspecting volumes. Remove them all and
consolidate to using the correct way. Compat API is likely still
doing things the wrong way, but that is an issue for another day.

Fixes #4304

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2021-01-14 15:35:33 -05:00
..
common
define Initial implementation of volume plugins 2021-01-14 15:35:33 -05:00
driver Exorcise Driver code from libpod/define 2021-01-12 11:48:53 -05:00
events close journald when reading 2021-01-04 13:27:38 -06:00
image Merge pull request #8950 from mheon/exorcise_driver 2021-01-12 14:02:32 -05:00
layers
linkmode
lock Remove excessive error wrapping 2020-10-05 15:30:37 -07:00
logs re-open container log files 2020-12-23 14:04:32 -06:00
network Fix problems reported by staticcheck 2021-01-12 16:11:09 +01:00
plugin Initial implementation of volume plugins 2021-01-14 15:35:33 -05:00
shutdown Do not error on installing duplicate shutdown handler 2020-12-07 10:00:36 -05:00
boltdb_state.go Initial implementation of volume plugins 2021-01-14 15:35:33 -05:00
boltdb_state_internal.go Initial implementation of volume plugins 2021-01-14 15:35:33 -05:00
boltdb_state_linux.go Spelling 2020-12-22 13:34:31 -05:00
boltdb_state_unsupported.go
common_test.go
container.go libpod: handle single user mapped as root 2020-12-24 13:39:15 +01:00
container_api.go Merge pull request #8906 from vrothberg/fix-8501 2021-01-14 13:37:16 -05:00
container_commit.go
container_config.go Spelling 2020-12-22 13:34:31 -05:00
container_exec.go Handle podman exec capabilities correctly 2021-01-07 05:53:50 -05:00
container_graph.go
container_graph_test.go
container_inspect.go Initial implementation of volume plugins 2021-01-14 15:35:33 -05:00
container_internal.go Initial implementation of volume plugins 2021-01-14 15:35:33 -05:00
container_internal_linux.go Initial implementation of volume plugins 2021-01-14 15:35:33 -05:00
container_internal_linux_test.go
container_internal_test.go
container_internal_unsupported.go Implement pod-network-reload 2020-12-07 19:26:23 +01:00
container_linux.go
container_log.go Fix podman logs read partial log lines 2021-01-07 00:04:38 +01:00
container_log_linux.go Fix Podman logs reading journald 2020-10-02 10:05:19 -04:00
container_log_unsupported.go
container_top_linux.go Remove varlink support from Podman 2020-11-26 16:50:42 -05:00
container_top_unsupported.go Spelling 2020-12-22 13:34:31 -05:00
container_unsupported.go
container_validate.go Spelling 2020-12-22 13:34:31 -05:00
diff.go fix podman container exists and diff for storage containers 2020-10-15 09:51:15 -04:00
events.go add network connect|disconnect compat endpoints 2020-11-19 08:16:19 -06:00
healthcheck.go Stop excessive wrapping of errors 2020-10-30 05:34:04 -04:00
healthcheck_linux.go Set PATH env in systemd timer. 2020-11-23 10:26:02 -08:00
healthcheck_unsupported.go
in_memory_state.go Fix problems reported by staticcheck 2021-01-12 16:11:09 +01:00
info.go Add Security information to podman info 2020-12-22 08:13:14 -05:00
kube.go Spelling 2020-12-22 13:34:31 -05:00
mounts_linux.go
networking_linux.go Switch references of /var/run -> /run 2021-01-07 05:37:24 -05:00
networking_unsupported.go Implement pod-network-reload 2020-12-07 19:26:23 +01:00
oci.go Handle podman exec capabilities correctly 2021-01-07 05:53:50 -05:00
oci_attach_linux.go oci: use /proc/self/fd/FD to open unix socket 2021-01-12 10:38:32 +01:00
oci_attach_unsupported.go
oci_conmon.go
oci_conmon_exec_linux.go oci: use /proc/self/fd/FD to open unix socket 2021-01-12 10:38:32 +01:00
oci_conmon_linux.go Merge pull request #8947 from Luap99/cleanup-code 2021-01-12 13:15:35 -05:00
oci_conmon_unsupported.go
oci_missing.go
oci_util.go Expose security attribute errors with their own messages 2021-01-12 16:10:17 +02:00
options.go Initial implementation of volume plugins 2021-01-14 15:35:33 -05:00
pod.go Add SELinux support for pods 2020-10-02 15:14:18 -04:00
pod_api.go Fix podman pod inspect show wrong MAC string 2020-11-18 18:06:06 +08:00
pod_internal.go
pod_status.go Add a Degraded state to pods 2020-10-21 13:31:40 -04:00
pod_top_linux.go Spelling 2020-12-22 13:34:31 -05:00
pod_top_unsupported.go
reset.go Don't accidently remove XDG_RUNTIME_DIR when reseting storage 2020-12-16 15:09:37 -05:00
rootless_cni_linux.go container stop: release lock before calling the runtime 2021-01-14 17:45:30 +01:00
runtime.go Initial implementation of volume plugins 2021-01-14 15:35:33 -05:00
runtime_cstorage.go Drop default log-level from error to warn 2020-12-03 06:28:09 -05:00
runtime_ctr.go Rework pruning to report reclaimed space 2020-12-30 19:57:35 -06:00
runtime_img.go Remove the ability to use [name:tag] in podman load command 2021-01-12 17:38:32 -05:00
runtime_img_test.go
runtime_migrate.go Use Libpod tmpdir for pause path 2020-12-02 14:18:37 -05:00
runtime_migrate_unsupported.go Use Libpod tmpdir for pause path 2020-12-02 14:18:37 -05:00
runtime_pod.go
runtime_pod_infra_linux.go Add default sysctls for pod infra containers 2021-01-04 15:29:18 -05:00
runtime_pod_linux.go Drop default log-level from error to warn 2020-12-03 06:28:09 -05:00
runtime_pod_unsupported.go
runtime_renumber.go
runtime_volume.go Rework pruning to report reclaimed space 2020-12-30 19:57:35 -06:00
runtime_volume_linux.go Initial implementation of volume plugins 2021-01-14 15:35:33 -05:00
runtime_volume_unsupported.go
state.go Add support for network connect / disconnect to DB 2020-11-11 16:37:54 -05:00
state_test.go Spelling 2020-12-22 13:34:31 -05:00
stats.go container cgroup path 2020-12-07 15:16:20 +01:00
stats_unsupported.go
storage.go
util.go Add support for Gentoo file to package query 2020-12-29 20:33:27 +01:00
util_linux.go
util_linux_test.go
util_test.go
util_unsupported.go
volume.go Initial implementation of volume plugins 2021-01-14 15:35:33 -05:00
volume_inspect.go Initial implementation of volume plugins 2021-01-14 15:35:33 -05:00
volume_internal.go Initial implementation of volume plugins 2021-01-14 15:35:33 -05:00
volume_internal_linux.go Initial implementation of volume plugins 2021-01-14 15:35:33 -05:00
volume_internal_unsupported.go