Currently the fake hypervisor has hardcoded ‘/var/run’ as a base
directory for its store. This patch adds a constant RUN_DIR that is used
for both the fake hypervisor and for BDEV_CACHE_DIR.
Reviewed-by: ultrotter
# file paths
DATA_DIR = _autoconf.LOCALSTATEDIR + "/lib/ganeti"
-BDEV_CACHE_DIR = _autoconf.LOCALSTATEDIR + "/run/ganeti"
+RUN_DIR = _autoconf.LOCALSTATEDIR + "/run"
+BDEV_CACHE_DIR = RUN_DIR + "/ganeti"
LOCK_DIR = _autoconf.LOCALSTATEDIR + "/lock"
CLUSTER_CONF_FILE = DATA_DIR + "/config.data"
SSL_CERT_FILE = DATA_DIR + "/server.pem"
a real virtualisation software installed.
"""
- _ROOT_DIR = "/var/run/ganeti-fake-hypervisor"
+ _ROOT_DIR = constants.RUN_DIR + "/ganeti-fake-hypervisor"
def __init__(self):
BaseHypervisor.__init__(self)