From: John Mulligan Date: Sun, 5 Nov 2023 21:03:34 +0000 (-0500) Subject: cephadm: add a make_run_dir function X-Git-Tag: v19.0.0^2~28 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=3939201f53d6c6eae23eec1ab83a47d987c18987;p=ceph.git 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 --- 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)