Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

Commit 12257b6

Browse files
author
Mandar Sawant
committed
CORTX-30537: add a way to disable formulaic pool versions
Hare automatically generates formulaic pool versions (i.e. different combinations of layouts) based on the tolerances for failure domains and corresponding layout parameters. In some configuration cases, these multiple poolversions may not be required and in-order to use other fault tolerant and recovery methods (e.g. automatic data recovery on process restart). Thus, there needs to be a way to disable generating formulaic pool versions. Solution: - Add a flag in cdf to disable formulaic pool versions. - Update cfgen to read corresponding flag and skip generating formulaic pool versions. - Add corresponding flag to hare mini-provisioner, set it to False by default. Signed-off-by: Mandar Sawant <[email protected]>
1 parent 8781c65 commit 12257b6

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed

cfgen/cfgen

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1947,8 +1947,11 @@ class ConfPool(ToDhall):
19471947
m0conf[parent].mdpool = pool_id
19481948
else:
19491949
assert t is PoolT.sns
1950-
for v in gen_allowances(tolerance):
1951-
ConfPverF.build(m0conf, pool_id, base=pver, allowance=v)
1950+
generate_formulaic_pvers = cluster_desc.get(
1951+
'generate_formulaic_pvers')
1952+
if generate_formulaic_pvers:
1953+
for v in gen_allowances(tolerance):
1954+
ConfPverF.build(m0conf, pool_id, base=pver, allowance=v)
19521955

19531956
return pool_id
19541957

cfgen/dhall/types/ClusterDesc.dhall

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ let Pool = ./PoolDesc.dhall
2626

2727
in
2828
{ create_aux : Optional Bool
29+
, generate_formulaic_pvers : Optional Bool
2930
, nodes : List Node
3031
, pools : List Pool
3132
, profiles : Optional (List ./PoolsRef.dhall)

cfgen/examples/singlenode.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ nodes:
4141
# port: 41500
4242
# m0_client_s3: 42500
4343
create_aux: false # optional; supported values: "false" (default), "true"
44+
generate_formulaic_pvers: false # optional; supported values: "false" (default), "true"
4445
pools:
4546
- name: the pool
4647
type: sns # optional; supported values: "sns" (default), "dix", "md"

provisioning/miniprov/hare_mp/cdf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ def _get_cdf_dhall(self) -> str:
369369

370370
params_text = str(
371371
ClusterDesc(create_aux=Maybe(create_aux, 'Bool'),
372+
generate_formulaic_pvers=Maybe(False, 'Bool'),
372373
node_info=DList(nodes, 'List NodeInfo'),
373374
pool_info=DList(pools, 'List PoolInfo'),
374375
profile_info=DList(profiles, 'List ProfileInfo'),

provisioning/miniprov/hare_mp/dhall/gencdf.dhall

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ let ProfileInfo =
7575

7676
let ClusterInfo =
7777
{ create_aux : Optional Bool
78+
, generate_formulaic_pvers: Optional Bool
7879
, node_info: List NodeInfo
7980
, pool_info: List PoolInfo
8081
, profile_info: List ProfileInfo

0 commit comments

Comments
 (0)