Run podman cleanup at start of baremetal CI job 17/3917/1
authorJames E. Blair <jeblair@redhat.com>
Fri, 13 Nov 2020 23:06:18 +0000 (15:06 -0800)
committerJames E. Blair <jeblair@redhat.com>
Fri, 13 Nov 2020 23:12:15 +0000 (15:12 -0800)
commit0fbcc122c9f56b87b43388ebb23cf30a338b3087
tree8e540c930fda73dc9c0d6bc76d29eec1c3786a42
parent268b305e132d7684119feb64dbb327cdaa248700
Run podman cleanup at start of baremetal CI job

The filesystem mounts for the containers running dnsmasq, etc,
in support of the virtual baremetal system can end up in the mounts
of the virtual machines, which means cleaning them all up needs to
be sequenced correctly: first the VMs should be removed, then the
containers.

There's an edge case where if a container is removed while the vm
is running, it will fail to remove the underlying storage, but no
longer appear in the list of containers.  This will prevent a
replacement with the same name from being created.  To handle this
case as well, we run 'podman rm --storage' after removal.  This
should allow us to clean up the host correctly even if an attempt
to clean up in the wrong order was made.

Signed-off-by: James E. Blair <jeblair@redhat.com>
Change-Id: Ie089ebab65f8a70732def5c882abf465561bebec
ci/kni_deploy_baremetal.sh