This patch creates a base RUN_GANETI_DIR and then moves the other run
dir constants to use that (even if just setting BDEV_CACHE_DIR as equal
to it, rather than putting it deeper, for now).
Also we create a constant list of all the subdirs we need in RUN_DIR to
work properly, which we'll use when creating them in ganeti-noded.
Reviewed-by: iustinp
# file paths
DATA_DIR = _autoconf.LOCALSTATEDIR + "/lib/ganeti"
RUN_DIR = _autoconf.LOCALSTATEDIR + "/run"
# file paths
DATA_DIR = _autoconf.LOCALSTATEDIR + "/lib/ganeti"
RUN_DIR = _autoconf.LOCALSTATEDIR + "/run"
-BDEV_CACHE_DIR = RUN_DIR + "/ganeti"
-DISK_LINKS_DIR = RUN_DIR + "/ganeti/instance-disks"
+RUN_GANETI_DIR = RUN_DIR + "/ganeti"
+BDEV_CACHE_DIR = RUN_GANETI_DIR # TODO(2.0): move deeper
+DISK_LINKS_DIR = RUN_GANETI_DIR + "/instance-disks"
+# keep RUN_GANETI_DIR first here, to make sure all get created when the node
+# daemon is started (this takes care of RUN_DIR being tmpfs)
+SUB_RUN_DIRS = [ RUN_GANETI_DIR, BDEV_CACHE_DIR, DISK_LINKS_DIR ]
LOCK_DIR = _autoconf.LOCALSTATEDIR + "/lock"
CLUSTER_CONF_FILE = DATA_DIR + "/config.data"
SSL_CERT_FILE = DATA_DIR + "/server.pem"
LOCK_DIR = _autoconf.LOCALSTATEDIR + "/lock"
CLUSTER_CONF_FILE = DATA_DIR + "/config.data"
SSL_CERT_FILE = DATA_DIR + "/server.pem"