summaryrefslogtreecommitdiffstats
path: root/jjb/qtip
diff options
context:
space:
mode:
authorwu.zhihui <wu.zhihui1@zte.com.cn>2016-09-13 16:44:04 +0800
committerwu.zhihui <wu.zhihui1@zte.com.cn>2016-09-18 15:03:35 +0800
commit6a4ddf3ca55ddc197ad19dc885b0c169d5b7e0cd (patch)
treedd4a6664b5a275475616ccded787e6c9737a4c30 /jjb/qtip
parent74a8ce5cac64c37a6baf6d62df0a21548a914c05 (diff)
qtip bugfix: failed to clean up qtip container
An error has happened a few times when stopping a container. See https://build.opnfv.org/ci/view/qtip/job/qtip-fuel-zte-pod2-daily-master/34/console. Don't find the cause of this error temporarily. Use the command "docker rm -f" to remove qtip container by force. It is a workaround to make sure qtip ci job not blocked by this error. According to ci log, sometimes, qtip containers are deleted failed. This change use the command "docker rm -f" to delete containers by force. Change-Id: I063be9615f1b87e616ff8c3a77a6684a68474e91 Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn>
Diffstat (limited to 'jjb/qtip')
-rw-r--r--jjb/qtip/qtip-cleanup.sh10
1 files changed, 3 insertions, 7 deletions
diff --git a/jjb/qtip/qtip-cleanup.sh b/jjb/qtip/qtip-cleanup.sh
index b923aa2a8..95babb318 100644
--- a/jjb/qtip/qtip-cleanup.sh
+++ b/jjb/qtip/qtip-cleanup.sh
@@ -6,15 +6,12 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-echo "Cleaning up QTIP docker containers/images..."
-
# Remove previous running containers if exist
if [[ ! -z $(docker ps -a | grep opnfv/qtip) ]]; then
echo "Removing existing opnfv/qtip containers..."
- running_containers=$(docker ps | grep opnfv/qtip | awk '{print $1}')
- docker stop ${running_containers}
- all_containers=$(docker ps -a | grep opnfv/qtip | awk '{print $1}')
- docker rm ${all_containers}
+ # workaround: sometimes it throws an error when stopping qtip container.
+ # To make sure ci job unblocked, remove qtip container by force without stopping it.
+ docker rm -f $(docker ps -a | grep opnfv/qtip | awk '{print $1}')
fi
# Remove existing images if exist
@@ -27,4 +24,3 @@ if [[ ! -z $(docker images | grep opnfv/qtip) ]]; then
docker rmi opnfv/qtip:$tag
done
fi
-