ganeti-noded used to create all directories under /var/run with an
hard-coded mode. convert it to a constant.
Reviewed-by: imsnah
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):
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