From fd83878a3e018d0722143dbc91edb3665ef635f1 Mon Sep 17 00:00:00 2001 From: Bryan Sullivan Date: Mon, 6 Nov 2017 12:15:45 -0800 Subject: Fix test job success test JIRA: MODELS-2 Change-Id: I773cc0950dd35e28710f7e296e52c74920b8ea6c Signed-off-by: Bryan Sullivan --- tools/kubernetes/ceph-helm.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/kubernetes/ceph-helm.sh b/tools/kubernetes/ceph-helm.sh index e9a926b..ea5dccf 100644 --- a/tools/kubernetes/ceph-helm.sh +++ b/tools/kubernetes/ceph-helm.sh @@ -134,6 +134,8 @@ EOG log "Create a pool from a ceph-mon pod (e.g., ceph-mon-0)" kubectl -n ceph exec -it ceph-mon-0 -- ceph osd pool create rbd 100 100 + # TODO: Workaround for issue: "rbd: map failed exit status 110 rbd: sysfs write failed" + kubectl -n ceph exec -it ceph-mon-0 -- ceph osd crush tunables legacy log "Create a pvc and check if the pvc status is Bound" @@ -152,12 +154,12 @@ EOG log "Verify that the test job was successful" pod=$(kubectl get pods --namespace default | awk "/ceph-test/{print \$1}") - active=$(kubectl get jobs --namespace default -o json ceph-test-job | jq -r '.status.active') - while [[ $active > 0 ]]; do + success=$(kubectl get jobs --namespace default -o json ceph-test-job | jq -r '.status.succeeded') + while [[ "$success" == "null" || "$success" == "0" ]]; do log "test job is still running, waiting 10 seconds for it to complete" kubectl describe pods --namespace default $pod | awk '/Events:/{y=1;next}y' sleep 10 - active=$(kubectl get jobs --namespace default -o json ceph-test-job | jq -r '.status.active') + success=$(kubectl get jobs --namespace default -o json ceph-test-job | jq -r '.status.succeeded') done log "test job succeeded" -- cgit 1.2.3-korg