From 3939201f53d6c6eae23eec1ab83a47d987c18987 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Sun, 5 Nov 2023 16:03:34 -0500 Subject: [PATCH] cephadm: add a make_run_dir function This function is roughly the same as make_var_run only it doesn't rely on shelling out to the install command. Eventually, it will be used to replace make_var_run in certain locations. Signed-off-by: John Mulligan --- src/cephadm/cephadmlib/file_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cephadm/cephadmlib/file_utils.py b/src/cephadm/cephadmlib/file_utils.py index 7c9e6f69e4341..1b9f11499a49f 100644 --- a/src/cephadm/cephadmlib/file_utils.py +++ b/src/cephadm/cephadmlib/file_utils.py @@ -139,3 +139,7 @@ def get_file_timestamp(fn): ).strftime(DATEFMT) except Exception: return None + + +def make_run_dir(fsid: str, uid: int, gid: int) -> None: + makedirs(f'/var/run/ceph/{fsid}', uid, gid, 0o770) -- 2.39.5