-
Notifications
You must be signed in to change notification settings - Fork 182
Support Running RDR test on HCP clients #13354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Support Running RDR test on HCP clients #13354
Conversation
Signed-off-by: prsurve <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: prsurve The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| """ | ||
| if index < 0 or index >= self.nclusters: | ||
| raise ClusterNotFoundException(f"Cluster with index {index} not found") | ||
| return self.clusters[index].ENV_DATA.get("cluster_path") + "auth/kubeconfig" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return self.clusters[index].ENV_DATA.get("cluster_path") + "auth/kubeconfig" | |
| return os.path.join( | |
| self.clusters[index].ENV_DATA["cluster_path"], self.clusters[index].RUN.get("kubeconfig_location", "auth/kubeconfig") | |
| ) |
| if not cephbpradosns: | ||
| raise NotFoundError("Couldn't identify the cephblockpoolradosnamespace") | ||
|
|
||
| cephbpradosns = "ocs-storagecluster-cephblockpool-" + cephbpradosns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If cephbpradosns is obtained from ocnfigmap the namespace value will be without "ocs-storagecluster-cephblockpool-" and this change works.
If cephbpradosns is obtained from ENV_DATA.radosnamespace_name , we need to ensure that the value is actual namespace name, not the cephblockpoolradosnamespace CR name. No code change change needed for this comment.
| for cluster in dr_helpers.get_all_drclusters() | ||
| if cluster != self.preferred_primary_cluster | ||
| ][0] | ||
| if get_primary_cluster_config().ENV_DATA["cluster_type"] == "hci_client": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HYPERSHIFT_ADDON_DISCOVERYPREFIX is applicable for hosted cluster as clients only.
is_hosted_cluster from ocs_ci/deployment/helpers/hypershift_base.py can be used.
| if cluster != self.preferred_primary_cluster | ||
| ][0] | ||
| if get_primary_cluster_config().ENV_DATA["cluster_type"] == "hci_client": | ||
| self.preferred_primary_cluster_client = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using self.preferred_primary_cluster itself with the updated name ?
self.preferred_primary_cluster = constants.HYPERSHIFT_ADDON_DISCOVERYPREFIX + "-" + self.preferred_primary_cluster
Since this is attribute of a workload related class, it is concerned about the name of the cluster in ACM hub context only.
| # load drpc.yaml | ||
| drpc_yaml_data = templating.load_yaml(self.drpc_yaml_file) | ||
| drpc_yaml_data["spec"]["preferredCluster"] = self.preferred_primary_cluster | ||
| drpc_yaml_data["spec"]["preferredCluster"] = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using self.preferred_primary_cluster itself with the updated name ?
self.preferred_primary_cluster = constants.HYPERSHIFT_ADDON_DISCOVERYPREFIX + "-" + self.preferred_primary_cluster
Since this is attribute of a workload related class, it is concerned about the name of the cluster in ACM hub context only.
| "preferred_primary_cluster" | ||
| ) or (get_primary_cluster_config().ENV_DATA["cluster_name"]) | ||
| if get_primary_cluster_config().ENV_DATA["cluster_type"] == "hci_client": | ||
| self.preferred_primary_cluster_client = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using self.preferred_primary_cluster itself with the updated name ?
self.preferred_primary_cluster = constants.HYPERSHIFT_ADDON_DISCOVERYPREFIX + "-" + self.preferred_primary_cluster
Since this is attribute of a workload related class, it is concerned about the name of the cluster in ACM hub context only.
| self.preferred_primary_cluster = config.ENV_DATA.get( | ||
| "preferred_primary_cluster" | ||
| ) or (get_primary_cluster_config().ENV_DATA["cluster_name"]) | ||
| if get_primary_cluster_config().ENV_DATA["cluster_type"] == "hci_client": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HYPERSHIFT_ADDON_DISCOVERYPREFIX is applicable for hosted cluster as clients only.
is_hosted_cluster from ocs_ci/deployment/helpers/hypershift_base.py can be used.
| self.preferred_primary_cluster = kwargs.get("preferred_primary_cluster") or ( | ||
| get_primary_cluster_config().ENV_DATA["cluster_name"] | ||
| ) | ||
| if get_primary_cluster_config().ENV_DATA["cluster_type"] == "hci_client": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the two comments given above is applicable here
| """ | ||
| non_acm_cluster_and_non_provider_cluster_indexes = [] | ||
| for cluster in get_non_acm_cluster_config(): | ||
| if not cluster.ENV_DATA["cluster_type"] == "provider": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the function config.get_provider_cluster_indexes
|
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
No description provided.