From e9f8f329843fcf0e1907595788727944fe30706d Mon Sep 17 00:00:00 2001 From: caoxianfei1 Date: Thu, 16 Nov 2023 16:38:46 +0800 Subject: [PATCH] [fix] fix entrypoint bug for monitor role Signed-off-by: caoxianfei1 --- curvefs/docker/debian11/entrypoint.sh | 5 ++++- curvefs/docker/openeuler/entrypoint.sh | 5 ++++- docker/debian11/entrypoint.sh | 5 ++++- docker/openeuler/entrypoint.sh | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/curvefs/docker/debian11/entrypoint.sh b/curvefs/docker/debian11/entrypoint.sh index 0ca397dace..35faec3cad 100755 --- a/curvefs/docker/debian11/entrypoint.sh +++ b/curvefs/docker/debian11/entrypoint.sh @@ -104,7 +104,10 @@ function prepare() { } function create_directory() { - chmod 700 "$g_prefix/data" + if [ "$g_role" != "monitor" ]; then + chmod 700 "$g_prefix/data" + fi + if [ "$g_role" == "etcd" ]; then mkdir -p "$g_prefix/data/wal" elif [ "$g_role" == "metaserver" ]; then diff --git a/curvefs/docker/openeuler/entrypoint.sh b/curvefs/docker/openeuler/entrypoint.sh index 0ca397dace..35faec3cad 100644 --- a/curvefs/docker/openeuler/entrypoint.sh +++ b/curvefs/docker/openeuler/entrypoint.sh @@ -104,7 +104,10 @@ function prepare() { } function create_directory() { - chmod 700 "$g_prefix/data" + if [ "$g_role" != "monitor" ]; then + chmod 700 "$g_prefix/data" + fi + if [ "$g_role" == "etcd" ]; then mkdir -p "$g_prefix/data/wal" elif [ "$g_role" == "metaserver" ]; then diff --git a/docker/debian11/entrypoint.sh b/docker/debian11/entrypoint.sh index 16d47fce63..81fcceecc9 100644 --- a/docker/debian11/entrypoint.sh +++ b/docker/debian11/entrypoint.sh @@ -109,7 +109,10 @@ function prepare() { } function create_directory() { - chmod 700 "$g_prefix/data" + if [ "$g_role" != "monitor" ]; then + chmod 700 "$g_prefix/data" + fi + if [ "$g_role" == "etcd" ]; then mkdir -p "$g_prefix/data/wal" elif [ "$g_role" == "client" ]; then diff --git a/docker/openeuler/entrypoint.sh b/docker/openeuler/entrypoint.sh index 476cc65f3c..b4adaeca92 100644 --- a/docker/openeuler/entrypoint.sh +++ b/docker/openeuler/entrypoint.sh @@ -108,7 +108,10 @@ function prepare() { } function create_directory() { - chmod 700 "$g_prefix/data" + if [ "$g_role" != "monitor" ]; then + chmod 700 "$g_prefix/data" + fi + if [ "$g_role" == "etcd" ]; then mkdir -p "$g_prefix/data/wal" elif [ "$g_role" == "client" ]; then