From f0026012fcb3d5dbc2ace67411d1c12afef854a2 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Tue, 25 Aug 2015 16:03:07 -0500 Subject: [PATCH] Fixing dockerctl restore/stop This change fixes the stop_container logic so that it correctly passes the keys from the CONTAINER_NAMES array to the stop_container function when 'all' is given. Previously the logic was incorrectly passing the values from the CONTAINER_NAMES array so the docker stop command was failing as part of a restore or a stop all. Change-Id: Id1d879ce9e4439b521a807e8e4abe18aada420a3 Related-Bug: 1485985 Closes-Bug: 1488541 --- files/fuel-docker-utils/functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/fuel-docker-utils/functions.sh b/files/fuel-docker-utils/functions.sh index 5706d7271c..d044f1ebe6 100644 --- a/files/fuel-docker-utils/functions.sh +++ b/files/fuel-docker-utils/functions.sh @@ -322,7 +322,7 @@ function lxc_shell_container { function stop_container { if [ "$1" = "all" ]; then - for container in ${CONTAINER_NAMES[@]}; do + for container in ${!CONTAINER_NAMES[@]}; do stop_container $container done return