mirror of https://github.com/milvus-io/milvus.git
[skip e2e]Display the log of proxy after test (#17447)
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>pull/17458/head
parent
0358950683
commit
545d62f31b
|
@ -7,6 +7,17 @@ ns_name=$1
|
|||
prefix_name=$2
|
||||
log_dir=${3:-"k8s_logs"}
|
||||
|
||||
#show proxy pod log
|
||||
array=($(kubectl get pod -n ${ns_name} -l "component=proxy, app.kubernetes.io/instance=${prefix_name}"| awk 'NR == 1 {next} {print $1}'))
|
||||
echo ${array[@]}
|
||||
|
||||
for pod in ${array[*]}
|
||||
do
|
||||
echo "show log of proxy pod $pod "
|
||||
kubectl logs $pod -n ${ns_name} --tail=100 || echo "show log for pod $pod failed"
|
||||
done
|
||||
|
||||
# export info of etcd
|
||||
array=($(kubectl get pod -n ${ns_name} -l "app.kubernetes.io/name=etcd" | grep ${prefix_name} | awk '{print $1}'))
|
||||
echo ${array[@]}
|
||||
mkdir -p $log_dir/etcd_session
|
||||
|
@ -17,6 +28,7 @@ kubectl exec $pod -n ${ns_name} -- etcdctl get --prefix by-dev/meta/session > ./
|
|||
done
|
||||
echo "check session done"
|
||||
|
||||
# export logs of all pods
|
||||
array=($(kubectl get pod -n ${ns_name}|grep ${prefix_name}|awk '{print $1}'))
|
||||
echo ${array[@]}
|
||||
if [ ! -d $log_dir/pod_log ] || [ ! -d $log_dir/pod_describe ];
|
||||
|
|
Loading…
Reference in New Issue