Commit 817a030d authored by Guido Trotter's avatar Guido Trotter
Browse files

convert run dir mode to constant

ganeti-noded used to create all directories under /var/run with an
hard-coded mode. convert it to a constant.

Reviewed-by: imsnah
parent 711b5124
......@@ -664,7 +664,7 @@ def EnsureRuntimeEnvironment():
packaging.
"""
dirs = [(val, 0755) for val in constants.SUB_RUN_DIRS]
dirs = [(val, constants.RUN_DIRS_MODE) for val in constants.SUB_RUN_DIRS]
dirs.append((constants.LOG_OS_DIR, 0750))
for dir_name, dir_mode in dirs:
if not os.path.exists(dir_name):
......
......@@ -84,6 +84,7 @@ RUN_DIR = _autoconf.LOCALSTATEDIR + "/run"
RUN_GANETI_DIR = RUN_DIR + "/ganeti"
BDEV_CACHE_DIR = RUN_GANETI_DIR + "/bdev-cache"
DISK_LINKS_DIR = RUN_GANETI_DIR + "/instance-disks"
RUN_DIRS_MODE = 0755
SOCKET_DIR = RUN_GANETI_DIR + "/socket"
SOCKET_DIR_MODE = 0700
# keep RUN_GANETI_DIR first here, to make sure all get created when the node
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment