Skip to content

Commit

Permalink
ci: fix mgr pdb resource count
Browse files Browse the repository at this point in the history
from recent ocs operator changes we are trying to
have more than 1 mgr by deafult,
So to imply it we need to check for the mgr pdb
which would get created if mgr count >1

Signed-off-by: parth-gr <[email protected]>
  • Loading branch information
parth-gr committed Oct 26, 2023
1 parent 2c075af commit dc8c8bc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
19 changes: 18 additions & 1 deletion ocs_ci/ocs/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -1240,9 +1240,26 @@ def validate_pdb_creation():
item_list = pdb_obj.get().get("items")
pdb_count = constants.PDB_COUNT
pdb_required = [constants.MDS_PDB, constants.MON_PDB, constants.OSD_PDB]

if version.get_semantic_ocs_version_from_config() >= version.VERSION_4_15:
pdb_count = constants.PDB_COUNT_2_MGR
pdb_required = [
constants.MDS_PDB,
constants.MON_PDB,
constants.OSD_PDB,
constants.MGR_PDB,
]

if config.DEPLOYMENT.get("arbiter_deployment"):
pdb_count = constants.PDB_COUNT_ARBITER
pdb_required.extend((constants.MGR_PDB, constants.RGW_PDB))
pdb_required = [
constants.MDS_PDB,
constants.MON_PDB,
constants.OSD_PDB,
constants.MGR_PDB,
constants.RGW_PDB,
]

if len(item_list) != pdb_count:
raise PDBNotCreatedException(
f"Not All PDB's created. Expected {pdb_count} PDB's but found {len(item_list)}"
Expand Down
1 change: 1 addition & 0 deletions ocs_ci/ocs/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,7 @@
MGR_PDB = "rook-ceph-mgr-pdb"
RGW_PDB = "rook-ceph-rgw-ocs-storagecluster-cephobjectstore"
PDB_COUNT = 3
PDB_COUNT_2_MGR = 4
PDB_COUNT_ARBITER = 5

# Root Disk size
Expand Down
1 change: 1 addition & 0 deletions ocs_ci/utility/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def get_semantic_version(version, only_major_minor=False, ignore_pre_release=Fal
VERSION_4_12 = get_semantic_version("4.12", True)
VERSION_4_13 = get_semantic_version("4.13", True)
VERSION_4_14 = get_semantic_version("4.14", True)
VERSION_4_15 = get_semantic_version("4.15", True)


def get_semantic_ocs_version_from_config(cluster_config=None):
Expand Down

0 comments on commit dc8c8bc

Please sign in to comment.