未验证 提交 545d62f3 编写于 作者: Z zhuwenxing 提交者: GitHub

[skip e2e]Display the log of proxy after test (#17447)

Signed-off-by: Nzhuwenxing <wenxing.zhu@zilliz.com>
上级 03589506
......@@ -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 ];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册