Remove anonymous volumes when deleting container
There are cases where the container storage gets out of sync, resulting in errors like: 2023-12-05T17:03:17.695962054+00:00 stderr F Error: creating container storage: the container name "nova_virtlogd" is already in use by 322ea2c1e5b194774b49c6605efd8284cf7d96663cb4a723396f8cb3f6897c33. You have to remove that container to be able to reuse that name: that name is already in use Deleting the container via 'podman rm -v' should avoid this scenario Change-Id: I3555c51f26d3e58024e9c1da769ca120bb0e758b
This commit is contained in:
parent
40278e101e
commit
a10816eb81
|
@ -21,7 +21,7 @@ case ${CONTAINER_STATUS_SHORT} in
|
|||
Exited| exited| EXITED| Created| created| CREATED)
|
||||
echo "Removing orphaned ${NAME} container ${CONTAINER_ID}"
|
||||
$CLI stop ${CONTAINER_ID} || true
|
||||
$CLI rm -f ${CONTAINER_ID} || true
|
||||
$CLI rm -f -v ${CONTAINER_ID} || true
|
||||
;&
|
||||
*)
|
||||
echo "Starting a new child container ${NAME}"
|
||||
|
|
Loading…
Reference in New Issue