Skip to content
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

check pv-backingstore pod before upgrade #10045

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions ocs_ci/ocs/ocs_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from ocs_ci.ocs.resources.catalog_source import CatalogSource, disable_specific_source
from ocs_ci.ocs.resources.csv import CSV, check_all_csvs_are_succeeded
from ocs_ci.ocs.resources.install_plan import wait_for_install_plan_and_approve
from ocs_ci.ocs.resources.pod import verify_pods_upgraded
from ocs_ci.ocs.resources.pod import get_noobaa_pods, verify_pods_upgraded
from ocs_ci.ocs.resources.packagemanifest import (
get_selector_for_ocs_operator,
PackageManifest,
Expand Down Expand Up @@ -134,11 +134,15 @@ def verify_image_versions(old_images, upgrade_version, version_before_upgrade):
verify_pods_upgraded(old_images, selector=constants.OPERATOR_LABEL)
default_noobaa_pods = 3
noobaa_pods = default_noobaa_pods
noobaa_pod_obj = get_noobaa_pods()
if (
config.ENV_DATA.get("mcg_only_deployment")
and config.ENV_DATA["platform"].lower() == constants.VSPHERE_PLATFORM
):
default_noobaa_pods = 4
for pod in noobaa_pod_obj:
if "pv-backingstore" in pod.name:
default_noobaa_pods += 1
if upgrade_version >= parse_version("4.7"):
noobaa = OCP(kind="noobaa", namespace=config.ENV_DATA["cluster_namespace"])
resource = noobaa.get()["items"][0]
Expand All @@ -158,7 +162,7 @@ def verify_image_versions(old_images, upgrade_version, version_before_upgrade):
except TimeoutException as ex:
if upgrade_version >= parse_version("4.7"):
log.info(
"Nooba pods didn't match. Trying once more with max noobaa endpoints!"
"Noobaa pods didn't match. Trying once more with max noobaa endpoints!"
f"Exception: {ex}"
)
noobaa_pods = default_noobaa_pods + max_endpoints
Expand Down
Loading