spiegel_podman/pkg/specgen
Matthew Heon 484bd0af1d Ensure pod infra containers have an exit command
Most Libpod containers are made via `pkg/specgen/generate` which
includes code to generate an appropriate exit command which will
handle unmounting the container's storage, cleaning up the
container's network, etc. There is one notable exception: pod
infra containers, which are made entirely within Libpod and do
not touch pkg/specgen. As such, no cleanup process, network never
cleaned up, bad things can happen.

There is good news, though - it's not that difficult to add this,
and it's done in this PR. Generally speaking, we don't allow
passing options directly to the infra container at create time,
but we do (optionally) proxy a pre-approved set of options into
it when we create it. Add ExitCommand to these options, and set
it at time of pod creation using the same code we use to generate
exit commands for normal containers.

Fixes #7103

Signed-off-by: Matthew Heon <mheon@redhat.com>

<MH: Fixed cherry-pick conflicts>

Signed-off-by: Matthew Heon <mheon@redhat.com>
2020-08-24 11:31:37 -04:00
..
generate Ensure pod infra containers have an exit command 2020-08-24 11:31:37 -04:00
config_unsupported.go move go module to v2 2020-07-06 15:52:17 +02:00
container_validate.go error when adding container to pod with network information 2020-08-24 11:31:37 -04:00
namespaces.go move go module to v2 2020-07-06 15:52:17 +02:00
pod_validate.go Error on rootless mac and ip addresses 2020-07-22 14:13:43 -04:00
podspecgen.go Fix container and pod create commands for remote create 2020-07-22 14:39:41 -04:00
specgen.go Fix container and pod create commands for remote create 2020-07-22 14:39:41 -04:00