Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix update.sh #3915

Merged
merged 1 commit into from
Jan 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/update-demo/2-create-replication-controller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [[ "${DOCKER_HUB_USER+set}" != "set" ]] ; then
exit 1
fi

export KUBE_ROOT=$(dirname $0)/../..
export KUBE_REPO_ROOT=${KUBE_REPO_ROOT-$(dirname $0)/../..}
export KUBECTL=${KUBE_REPO_ROOT}/cluster/kubectl.sh

set -x
Expand Down
10 changes: 5 additions & 5 deletions hack/e2e-suite/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function validate() {
# Container turn up on a clean cluster can take a while for the docker image pull.
local num_running=0
local i=0
while [[ ${num_running} -ne ${num_replicas} && ${i} -ne 100]]; do
while [[ ${num_running} -ne ${num_replicas} && ${i} -ne 100 ]]; do
((i++)) || true
echo "Waiting for all containers in pod to come up. Currently: ${num_running}/${num_replicas}"
sleep 2
Expand Down Expand Up @@ -62,7 +62,7 @@ function validate() {
# This template is unit-tested in kubec{tl|fg}, so if you change it, update the unit test.
#
# You can read about the syntax here: http://golang.org/pkg/text/template/
template_string="{{and (exists . \"currentState\" \"info\" \"${CONTROLLER_NAME}\" \"state\" \"running\") (exists . \"currentState\" \"info\" \"net\" \"state\" \"running\")}}"
template_string="{{and (exists . \"currentState\" \"info\" \"${CONTROLLER_NAME}\" \"state\" \"running\") (exists . \"currentState\" \"info\" \"POD\" \"state\" \"running\")}}"
current_status=$($KUBECTL get pods "$id" -o template --template="${template_string}") || {
if [[ $current_status =~ "pod \"${id}\" not found" ]]; then
echo " $id no longer exists"
Expand Down Expand Up @@ -106,16 +106,16 @@ function validate() {

export DOCKER_HUB_USER=jlowdermilk

# Launch a container
${KUBE_ROOT}/examples/update-demo/2-create-replication-controller.sh

function teardown() {
echo "Cleaning up test artifacts"
${KUBE_ROOT}/examples/update-demo/5-down.sh
}

trap "teardown" EXIT

# Launch a container
${KUBE_ROOT}/examples/update-demo/2-create-replication-controller.sh

validate 2 nautilus

${KUBE_ROOT}/examples/update-demo/3-scale.sh 1
Expand Down