Skip to content
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
5 changes: 3 additions & 2 deletions ocs_ci/deployment/helpers/external_cluster_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1204,11 +1204,12 @@ def _external_ceph_semantic_version_or_none():

def external_rgw_ca_should_use_cephadm_fetch():
"""
True when external Ceph reports version >= 19.0 (cephadm certmgr path).
True when external Ceph reports version >= 19.0 (cephadm certmgr path), or if
version is not determined (None) - assuming that from ODF 4.18 we are using Ceph >= 19.
"""
v = _external_ceph_semantic_version_or_none()
if v is None:
return False
return True
return v >= version.get_semantic_version("19.0", only_major_minor=True)
Comment on lines 1211 to 1213
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Gate unknown-version fallback to ODF 4.18+ only.

At Line 1212, None now maps to True unconditionally, which applies the Ceph >=19 path for all ODF versions. The PR objective/docstring scopes this assumption to ODF 4.18 and newer.

🔧 Proposed fix
 def external_rgw_ca_should_use_cephadm_fetch():
@@
     v = _external_ceph_semantic_version_or_none()
     if v is None:
-        return True
+        odf_version = version.get_semantic_ocs_version_from_config()
+        return odf_version >= version.VERSION_4_18
     return v >= version.get_semantic_version("19.0", only_major_minor=True)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ocs_ci/deployment/helpers/external_cluster_helpers.py` around lines 1211 -
1213, The current branch returns True for v is None unconditionally; instead,
when v is None, only return True if the detected ODF release is 4.18 or newer.
Change the `if v is None:` branch to call `version.get_semantic_version("4.18",
only_major_minor=True)` (or your existing ODF version lookup) and return the
result of comparing that ODF semver against 4.18 (i.e., return odf_semver is not
None and odf_semver >= version.get_semantic_version("4.18",
only_major_minor=True)); otherwise fall through to the existing `return v >=
version.get_semantic_version("19.0", only_major_minor=True)` logic. This ties
the unknown-version fallback to ODF >= 4.18 rather than applying it
unconditionally.



Expand Down
Loading