diff options
author | 2017-11-06 12:15:45 -0800 | |
---|---|---|
committer | 2017-11-06 12:15:45 -0800 | |
commit | fd83878a3e018d0722143dbc91edb3665ef635f1 (patch) | |
tree | 69e614639368713b30378dcd38a2f84cd3353118 | |
parent | cdfa3e4e0aed5215db73877882f46a60646ffb31 (diff) |
Fix test job success test
JIRA: MODELS-2
Change-Id: I773cc0950dd35e28710f7e296e52c74920b8ea6c
Signed-off-by: Bryan Sullivan <bryan.sullivan@att.com>
-rw-r--r-- | tools/kubernetes/ceph-helm.sh | 8 |
1 files 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" |