Skip to content

Commit 16eeff8

Browse files
authored
[improvement](doris compose) make lock file all users can read and write (#37878)
Fix other user create cluster fail because no permission to the lock file.
1 parent 497a1c9 commit 16eeff8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docker/runtime/doris-compose/cluster.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,12 @@ def __init__(self, name, subnet, image, is_cloud, fe_config, be_config,
622622
def new(name, image, is_cloud, fe_config, be_config, ms_config,
623623
recycle_config, be_disks, be_cluster, reg_be, coverage_dir,
624624
cloud_store_config):
625-
os.makedirs(LOCAL_DORIS_PATH, exist_ok=True)
626-
with filelock.FileLock(os.path.join(LOCAL_DORIS_PATH, "lock")):
625+
if not os.path.exists(LOCAL_DORIS_PATH):
626+
os.makedirs(LOCAL_DORIS_PATH, exist_ok=True)
627+
os.chmod(LOCAL_DORIS_PATH, 0o777)
628+
lock_file = os.path.join(LOCAL_DORIS_PATH, "lock")
629+
with filelock.FileLock(lock_file):
630+
os.chmod(lock_file, 0o666)
627631
subnet = gen_subnet_prefix16()
628632
cluster = Cluster(name, subnet, image, is_cloud, fe_config,
629633
be_config, ms_config, recycle_config, be_disks,

0 commit comments

Comments
 (0)