From 0907e1d7d28cabaf19c03cd3b22d50f4afc03a98 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Mon, 23 Sep 2024 12:58:49 -0400 Subject: [PATCH] Add OSD count configuration handling --- bootstrap-daemon/pvcbootstrapd/lib/hooks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap-daemon/pvcbootstrapd/lib/hooks.py b/bootstrap-daemon/pvcbootstrapd/lib/hooks.py index 8c50ef8..05e966a 100755 --- a/bootstrap-daemon/pvcbootstrapd/lib/hooks.py +++ b/bootstrap-daemon/pvcbootstrapd/lib/hooks.py @@ -84,13 +84,14 @@ def run_hook_osd(config, targets, args): weight = args.get("weight", 1) ext_db_flag = args.get("ext_db", False) ext_db_ratio = args.get("ext_db_ratio", 0.05) + osd_count = args.get("osd_count", 1) logger.info(f"Creating OSD on node {node_name} device {device} weight {weight}") # Using a direct command on the target here is somewhat messy, but avoids many # complexities of determining a valid API listen address, etc. pvc_cmd_string = ( - f"pvc storage osd add --yes {node_name} {device} --weight {weight}" + f"pvc storage osd add --yes {node_name} {device} --weight {weight} --osd-count {osd_count}" ) if ext_db_flag: pvc_cmd_string = f"{pvc_cmd_string} --ext-db --ext-db-ratio {ext_db_ratio}"