From: wu.zhihui Date: Tue, 13 Sep 2016 08:44:04 +0000 (+0800) Subject: qtip bugfix: failed to clean up qtip container X-Git-Tag: danube.1.0~784^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F91%2F20991%2F4;p=releng.git 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 --- 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 -