From c36c1345f7f36446c6840b40186a91a6444641f9 Mon Sep 17 00:00:00 2001 From: ymakedaq <996156275@qq.com> Date: Wed, 1 Nov 2023 09:38:35 +0800 Subject: [PATCH] fix(dbm-services): get disk mount point is empty close #1600 --- .../common/db-resource/internal/svr/bk/get_block_info.sh | 4 +++- helm-charts/bk-dbm/charts/db-resource/Chart.yaml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dbm-services/common/db-resource/internal/svr/bk/get_block_info.sh b/dbm-services/common/db-resource/internal/svr/bk/get_block_info.sh index e3be3193db..24a66b55da 100644 --- a/dbm-services/common/db-resource/internal/svr/bk/get_block_info.sh +++ b/dbm-services/common/db-resource/internal/svr/bk/get_block_info.sh @@ -90,10 +90,12 @@ do do # 不采集根目录磁盘的大小 mp=`getMountPoint ${part}` + if [ -z "$mp" ];then + continue + fi if [ ${mp} == "/" ];then continue fi - if [ "$partitioned" = true ];then sz=`cat ${SYSBLOCK_DIR}/${dname}/${part}/size` else diff --git a/helm-charts/bk-dbm/charts/db-resource/Chart.yaml b/helm-charts/bk-dbm/charts/db-resource/Chart.yaml index 5ffca27989..5dbf9b03ee 100644 --- a/helm-charts/bk-dbm/charts/db-resource/Chart.yaml +++ b/helm-charts/bk-dbm/charts/db-resource/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 0.0.1-alpha.49 +appVersion: 0.0.1-alpha.51 description: A Helm chart for Kubernetes name: db-resource type: application