From 0e1408844be02966464a4143a90e3296de0173c8 Mon Sep 17 00:00:00 2001 From: Yao Zongyou Date: Thu, 19 Sep 2019 12:49:51 +0800 Subject: [PATCH] fix get container id bug (#8196) --- mint/mint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mint/mint.sh b/mint/mint.sh index 953c3f096..e05c207b4 100755 --- a/mint/mint.sh +++ b/mint/mint.sh @@ -15,7 +15,7 @@ # limitations under the License. # -CONTAINER_ID=$(awk -F / '{ print substr($NF, 1, 12) }' /proc/1/cpuset) +CONTAINER_ID=$(grep -o -e '[0-f]\{12,\}' /proc/1/cpuset | awk '{print substr($1, 1, 12)}') MINT_DATA_DIR=${MINT_DATA_DIR:-/mint/data} MINT_MODE=${MINT_MODE:-core} SERVER_REGION=${SERVER_REGION:-us-east-1}