From 95d4226c4ce4e3ddd0d159572790d04c17bea831 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 12 Oct 2015 07:34:41 -0400 Subject: [PATCH] make i local This prevents bleed out of the i variable to other functions that might call this inside their own iteration loop. Change-Id: I42d0c287a6f4bb24ae3871de9abb7e0de98a8462 --- lib/ironic | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ironic b/lib/ironic index 40475e0a83..6ec7e8092b 100644 --- a/lib/ironic +++ b/lib/ironic @@ -559,6 +559,7 @@ function wait_for_nova_resources { # timing out. local resource=$1 local expected_count=$2 + local i echo_summary "Waiting 2 minutes for Nova resource tracker to pick up $resource >= $expected_count" for i in $(seq 1 120); do if [ $(nova hypervisor-stats | grep " $resource " | get_field 2) -ge $expected_count ]; then