Fix rook-ceph apply rejected when not using the latest k8s version available

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 <italo.gomesvieira@windriver.com>
This commit is contained in:
Ítalo Vieira 2024-12-09 14:36:06 -03:00
parent fa3894d6c4
commit 3d6aacdb9b

View File

@ -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(