Skip to content

Commit

Permalink
Add HCI_PROVIDER_CLIENT_PLATFORMS adjustment for existing MS Conditions.
Browse files Browse the repository at this point in the history
Signed-off-by: suchita-g <sgatfane@redhat.com>

Enable use of ceph pod from provider from pod disruptions helps

Signed-off-by: suchita-g <sgatfane@redhat.com>
  • Loading branch information
suchita-g committed Nov 23, 2023
1 parent 1a740d7 commit fc875e4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
10 changes: 5 additions & 5 deletions ocs_ci/helpers/disruption_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def kubeconfig_parameter(self):

def set_resource(self, resource, leader_type="provisioner", cluster_index=None):
self.resource = resource
if (config.ENV_DATA["platform"] in constants.MANAGED_SERVICE_PLATFORMS) and (
resource in CEPH_PODS
):
if (
config.ENV_DATA["platform"].lower() in constants.HCI_PC_OR_MS_PLATFORM
) and (resource in CEPH_PODS):
# If the platform is Managed Services, then the ceph pods will be present in the provider cluster.
# Consumer cluster will be the primary cluster context in a multicluster run. Setting 'cluster_kubeconfig'
# attribute to use as the value of the parameter '--kubeconfig' in the 'oc' commands to get ceph pods.
Expand All @@ -55,8 +55,8 @@ def set_resource(self, resource, leader_type="provisioner", cluster_index=None):
),
)
self.cluster_kubeconfig = provider_kubeconfig
elif config.ENV_DATA["platform"] in constants.MANAGED_SERVICE_PLATFORMS:
# cluster_index is used to identify the the cluster in which the pod is residing. If cluster_index is not
elif config.ENV_DATA["platform"] in constants.HCI_PC_OR_MS_PLATFORM:
# cluster_index is used to identify the cluster in which the pod is residing. If cluster_index is not
# passed, assume that the context is already changed to the cluster where the pod is residing.
cluster_index = (
cluster_index if cluster_index is not None else config.cur_index
Expand Down
9 changes: 5 additions & 4 deletions ocs_ci/helpers/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4067,10 +4067,11 @@ def get_cephfs_subvolumegroup():
str: The name of cephfilesystemsubvolumegroup
"""
if (
config.ENV_DATA.get("platform", "").lower()
in constants.MANAGED_SERVICE_PLATFORMS
and config.ENV_DATA.get("cluster_type", "").lower() == "consumer"
if config.ENV_DATA.get(
"platform", ""
).lower() in constants.HCI_PC_OR_MS_PLATFORM and (
config.ENV_DATA.get("cluster_type", "").lower() == "consumer"
or config.ENV_DATA.get("cluster_type", "").lower() == constants.HCI_CLIENT
):
subvolume_group = ocp.OCP(
kind=constants.CEPHFILESYSTEMSUBVOLUMEGROUP,
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 @@ -1025,6 +1025,7 @@
HCI_VSPHERE,
]

HCI_PC_OR_MS_PLATFORM = MANAGED_SERVICE_PLATFORMS + HCI_PROVIDER_CLIENT_PLATFORMS
# AWS i3 worker instance for LSO
AWS_LSO_WORKER_INSTANCE = "i3en.2xlarge"

Expand Down

0 comments on commit fc875e4

Please sign in to comment.