Checks execution for ASCS/ERS clusters when SAP system is not registered - #4597
Checks execution for ASCS/ERS clusters when SAP system is not registered#4597arbulu89 wants to merge 2 commits into
Conversation
| hosts_data = | ||
| Repo.all( | ||
| from h in HostReadModel, | ||
| join: a in ApplicationInstanceReadModel, |
There was a problem hiding this comment.
comment:
this join is the issue.
If no ApplicationInstance is available (which can happen if the SAP system is not fully registered), it would return an empty list, so we wouldn't send any valid target.
There was a problem hiding this comment.
Pull request overview
This PR fixes on-demand checks execution for ASCS/ERS clusters when the related SAP system is not registered in Trento (previously resulting in invalid/empty targets and a stuck “checks running” UI state). It also introduces an explicit “unknown” ENSA version to allow checks execution and selection to behave predictably when ENSA metadata can’t be derived.
Changes:
- Build ASCS/ERS checks execution targets from active cluster hosts (not from registered SAP system/application instance joins), preventing empty target sets when the SAP system is missing.
- Derive cluster ENSA version with a fallback to
unknownwhen no matching SAP system data is available. - Update frontend ENSA version selector to return
unknownwhen no SAP systems are present, and extend unit coverage for this case.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/trento/clusters_test.exs | Updates ASCS/ERS execution tests for broader host targeting and adds coverage for unregistered SAP system → unknown ENSA version. |
| lib/trento/clusters/enums/cluster_ensa_version.ex | Extends cluster ENSA enum with a new :unknown value. |
| lib/trento/clusters.ex | Fixes ASCS/ERS checks execution target selection and ENSA version derivation with an unknown fallback. |
| assets/js/state/selectors/cluster.test.js | Adds test coverage for returning UNKNOWN_ENSA_VERSION when SAP systems are absent. |
| assets/js/state/selectors/cluster.js | Updates ENSA selector logic and introduces UNKNOWN_ENSA_VERSION constant. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Description
Fix for ASCS/ERS clusters checks exectution when SAP system is not registered.
I know users should have fully database and SAP systems registered, but trento show this clusters, and the checks execution is available. I think it is good to give the chance to run the correct checks for these cases.
When a SAP system handled by the pacemaker cluster is not registered in Trento, the targets information we create is invalid, as it doesn't create any target.
This resolves not sending any valid check and wanda failing with the next error:
This causes
webstaying with a spinner saying the checks are being executed forever.As an additional improvement, the catalog won't show for this cluster checks which need
ensa_versionmetadata information, so they cannot select the check itself.How was this tested?
UT and some manual testing
Documentation changes
No