[skip ci]Fix pod failure chaos test action (#12976)

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
pull/12988/head
zhuwenxing 2021-12-08 16:43:30 +08:00 committed by GitHub
parent 69259d9294
commit 6f139cc0d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 6 deletions

View File

@ -16,6 +16,9 @@ jobs:
pod: [querynode, datanode, indexnode, proxy]
steps:
- name: Set env param
run: |
echo "RELEASE=test-${{ matrix.pod }}-pod-failure" >> $GITHUB_ENV
- name: Creating kind cluster
uses: helm/kind-action@v1.2.0
@ -64,11 +67,11 @@ jobs:
declare -A pod_map=( ["querynode"]="queryNode" ["indexnode"]="indexNode" ["datanode"]="dataNode" ["proxy"]="proxy")
helm repo add milvus https://milvus-io.github.io/milvus-helm
helm repo update
helm install --wait --timeout 720s milvus-chaos milvus/milvus --set ${pod_map[${{ matrix.pod }}]}.replicas=2 -f cluster-values.yaml -n=chaos-testing
helm install --wait --timeout 720s ${{ env.RELEASE }} milvus/milvus --set ${pod_map[${{ matrix.pod }}]}.replicas=2 -f cluster-values.yaml -n=chaos-testing
kubectl get pods -n chaos-testing
sleep 20s
kubectl get pods -n chaos-testing
kubectl port-forward service/milvus-chaos 19530 -n chaos-testing >/dev/null 2>&1 &
kubectl port-forward service/${{ env.RELEASE }}-milvus 19530 -n chaos-testing >/dev/null 2>&1 &
sleep 20s
# check whether port-forward success
nc -vz 127.0.0.1 19530
@ -95,8 +98,8 @@ jobs:
working-directory: tests/python_client/chaos
run: |
kubectl get pod -n chaos-testing
kubectl wait --for=condition=Ready pod -l app.kubernetes.io/instance=milvus-chaos -n chaos-testing --timeout=360s
kubectl wait --for=condition=Ready pod -l release=milvus-chaos -n chaos-testing --timeout=360s
kubectl wait --for=condition=Ready pod -l app.kubernetes.io/instance=${{ env.RELEASE }} -n chaos-testing --timeout=360s
kubectl wait --for=condition=Ready pod -l release=${{ env.RELEASE }} -n chaos-testing --timeout=360s
python scripts/hello_milvus.py
- name: Data Consist Test
@ -114,8 +117,8 @@ jobs:
working-directory: tests/python_client/chaos
run: |
kubectl get pod -n chaos-testing
kubectl wait --for=condition=Ready pod -l app.kubernetes.io/instance=milvus-chaos -n chaos-testing --timeout=360s
kubectl wait --for=condition=Ready pod -l release=milvus-chaos -n chaos-testing --timeout=360s
kubectl wait --for=condition=Ready pod -l app.kubernetes.io/instance=${{ env.RELEASE }} -n chaos-testing --timeout=360s
kubectl wait --for=condition=Ready pod -l release=${{ env.RELEASE }} -n chaos-testing --timeout=360s
python scripts/hello_milvus.py
- name: Export logs