From 3d6aacdb9b093c651de3c4b57183bbd20b90b5af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=8Dtalo=20Vieira?= Date: Mon, 9 Dec 2024 14:36:06 -0300 Subject: [PATCH] Fix rook-ceph apply rejected when not using the latest k8s version available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the Kubernetes active version is prior to the latest one available in the system, the rook-ceph apply is rejected with the message: "Application-apply rejected: The kubernetes version must be the latest version." This fix is to remove the check that causes the reject. Test Plan: PASS: SX - Apply rook-ceph without latest version as active PASS: DX - Apply rook-ceph without latest version as active Closes-Bug: 2091320 Change-Id: I20d46eaee024c268eb483e78a0ce06e40b7faf01 Signed-off-by: Ítalo Vieira --- .../lifecycle/lifecycle_rook_ceph.py | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/python3-k8sapp-rook-ceph/k8sapp_rook_ceph/k8sapp_rook_ceph/lifecycle/lifecycle_rook_ceph.py b/python3-k8sapp-rook-ceph/k8sapp_rook_ceph/k8sapp_rook_ceph/lifecycle/lifecycle_rook_ceph.py index 7168e3f..fd8ca31 100644 --- a/python3-k8sapp-rook-ceph/k8sapp_rook_ceph/k8sapp_rook_ceph/lifecycle/lifecycle_rook_ceph.py +++ b/python3-k8sapp-rook-ceph/k8sapp_rook_ceph/k8sapp_rook_ceph/lifecycle/lifecycle_rook_ceph.py @@ -724,18 +724,6 @@ class RookCephAppLifecycleOperator(base.AppLifecycleOperator): return replication - def is_latest_kube_version(self, app_op): - """Checks if kubernetes version is the latest supported version""" - active_kube_version = app_op._kube.kube_get_kubernetes_version() - latest_supported_kube_version = kube_utils.get_latest_supported_version() - is_latest_kube_version = False - - if active_kube_version: - if active_kube_version == latest_supported_kube_version: - is_latest_kube_version = True - - return is_latest_kube_version - def handle_incomplete_config_alarm(self, api, action, alarm_type): reasons = { app_constants.ALARM_TYPE_MISSING_MONS: @@ -826,14 +814,6 @@ class RookCephAppLifecycleOperator(base.AppLifecycleOperator): ceph_rook_backend = app_utils.get_ceph_rook_backend(dbapi) worker_hosts = dbapi.ihost_get_by_personality(constants.WORKER) - # CHECK AND FAIL: Are we running on the final version of k8s TODO - # (rchurch): This is for initial introduction in stx.10.0. Remove this - # check for stx.11.0 - if not self.is_latest_kube_version(app_op): - raise exception.LifecycleSemanticCheckException( - "The kubernetes version must be the latest version." - ) - # CHECK AND FAIL: Need a storage backend if not ceph_rook_backend: raise exception.LifecycleSemanticCheckException(