Readd missing subsystem configurations
This commit is contained in:
parent
c8f4cbb39e
commit
eaf93cdf96
|
@ -174,6 +174,16 @@ def get_configuration_current(config_file):
|
||||||
}
|
}
|
||||||
config = {**config, **config_path}
|
config = {**config, **config_path}
|
||||||
|
|
||||||
|
o_subsystem = o_config["subsystem"]
|
||||||
|
config_subsystem = {
|
||||||
|
"enable_hypervisor": o_subsystem.get("enable_hypervisor", True),
|
||||||
|
"enable_networking": o_subsystem.get("enable_networking", True),
|
||||||
|
"enable_storage": o_subsystem.get("enable_storage", True),
|
||||||
|
"enable_worker": o_subsystem.get("enable_worker", True),
|
||||||
|
"enable_api": o_subsystem.get("enable_api", True),
|
||||||
|
}
|
||||||
|
config = {**config, **config_subsystem}
|
||||||
|
|
||||||
o_cluster = o_config["cluster"]
|
o_cluster = o_config["cluster"]
|
||||||
config_cluster = {
|
config_cluster = {
|
||||||
"cluster_name": o_cluster["name"],
|
"cluster_name": o_cluster["name"],
|
||||||
|
@ -397,6 +407,7 @@ def get_configuration_legacy(pvcnoded_config_file):
|
||||||
"enable_hypervisor": o_functions.get("enable_hypervisor", False),
|
"enable_hypervisor": o_functions.get("enable_hypervisor", False),
|
||||||
"enable_networking": o_functions.get("enable_networking", False),
|
"enable_networking": o_functions.get("enable_networking", False),
|
||||||
"enable_storage": o_functions.get("enable_storage", False),
|
"enable_storage": o_functions.get("enable_storage", False),
|
||||||
|
"enable_worker": o_functions.get("enable_worker", True),
|
||||||
"enable_api": o_functions.get("enable_api", False),
|
"enable_api": o_functions.get("enable_api", False),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,14 +70,16 @@ def start_ceph_mgr(logger, config):
|
||||||
|
|
||||||
|
|
||||||
def start_keydb(logger, config):
|
def start_keydb(logger, config):
|
||||||
if config["enable_api"] and config["daemon_mode"] == "coordinator":
|
if (config["enable_api"] or config["enable_worker"]) and config[
|
||||||
|
"daemon_mode"
|
||||||
|
] == "coordinator":
|
||||||
logger.out("Starting KeyDB daemon", state="i")
|
logger.out("Starting KeyDB daemon", state="i")
|
||||||
# TODO: Move our handling out of Systemd and integrate it directly as a subprocess?
|
# TODO: Move our handling out of Systemd and integrate it directly as a subprocess?
|
||||||
common.run_os_command("systemctl start keydb-server.service")
|
common.run_os_command("systemctl start keydb-server.service")
|
||||||
|
|
||||||
|
|
||||||
def start_api_worker(logger, config):
|
def start_worker(logger, config):
|
||||||
if config["enable_api"]:
|
if config["enable_worker"]:
|
||||||
logger.out("Starting Celery Worker daemon", state="i")
|
logger.out("Starting Celery Worker daemon", state="i")
|
||||||
# TODO: Move our handling out of Systemd and integrate it directly as a subprocess?
|
# TODO: Move our handling out of Systemd and integrate it directly as a subprocess?
|
||||||
common.run_os_command("systemctl start pvcworkerd.service")
|
common.run_os_command("systemctl start pvcworkerd.service")
|
||||||
|
@ -91,7 +93,7 @@ def start_system_services(logger, config):
|
||||||
start_ceph_mon(logger, config)
|
start_ceph_mon(logger, config)
|
||||||
start_ceph_mgr(logger, config)
|
start_ceph_mgr(logger, config)
|
||||||
start_keydb(logger, config)
|
start_keydb(logger, config)
|
||||||
start_api_worker(logger, config)
|
start_worker(logger, config)
|
||||||
|
|
||||||
logger.out("Waiting 10 seconds for daemons to start", state="s")
|
logger.out("Waiting 10 seconds for daemons to start", state="s")
|
||||||
sleep(10)
|
sleep(10)
|
||||||
|
|
|
@ -28,6 +28,26 @@ path:
|
||||||
# Ceph configuration directory (set by Ceph/Ansible)
|
# Ceph configuration directory (set by Ceph/Ansible)
|
||||||
ceph_directory: "/etc/ceph"
|
ceph_directory: "/etc/ceph"
|
||||||
|
|
||||||
|
# Subsystem configuration
|
||||||
|
# Changing these values can be used to turn on or off various parts of PVC
|
||||||
|
# Normally, all should be enabled ("yes") except in very custom clusters
|
||||||
|
subsystem:
|
||||||
|
|
||||||
|
# Enable or disable hypervisor functionality
|
||||||
|
enable_hypervisor: yes
|
||||||
|
|
||||||
|
# Enable or disable virtual networking and routing functionality
|
||||||
|
enable_networking: yes
|
||||||
|
|
||||||
|
# Enable or disable Ceph storage management functionality
|
||||||
|
enable_storage: yes
|
||||||
|
|
||||||
|
# Enable or disable the worker client
|
||||||
|
enable_worker: yes
|
||||||
|
|
||||||
|
# Enable or disable the API client, if installed, when node is Primary
|
||||||
|
enable_api: yes
|
||||||
|
|
||||||
# Cluster configuration
|
# Cluster configuration
|
||||||
cluster:
|
cluster:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue