Add `--force` to `docker rm` in DevStack plugin

Seems like CentOS gate sometimes fails on plugin.sh:extract_hyperkube
with:

  Error response from daemon: You cannot remove a running container
  <id>. Stop the container before attempting removal or force remove

Let's listen to the log message and add `--force` to that `docker rm`.

Change-Id: Ia0891d074e0b4c5870ec67f1f4459e8c7110aebd
This commit is contained in:
Michał Dulko 2018-10-16 18:45:20 +02:00
parent 94cb656c2e
commit efbb34449c
1 changed files with 1 additions and 1 deletions

View File

@ -647,7 +647,7 @@ function extract_hyperkube {
"$tmp_loopback_cni_path"
docker cp "${hyperkube_container}:/usr/bin/nsenter" "$tmp_nsenter_path"
docker rm "$hyperkube_container"
docker rm --force "$hyperkube_container"
sudo install -o "$STACK_USER" -m 0555 -D "$tmp_hyperkube_path" \
"$KURYR_HYPERKUBE_BINARY"
sudo install -o "$STACK_USER" -m 0555 -D "$tmp_loopback_cni_path" \