Skip to content

Dev: corosync: Add corosync health check#2149

Open
nicholasyang2022 wants to merge 1 commit into
ClusterLabs:masterfrom
nicholasyang2022:feature/corosync-health-check
Open

Dev: corosync: Add corosync health check#2149
nicholasyang2022 wants to merge 1 commit into
ClusterLabs:masterfrom
nicholasyang2022:feature/corosync-health-check

Conversation

@nicholasyang2022

Copy link
Copy Markdown
Collaborator

Introduce the corosync health check under 'crm cluster health corosync'.

  • Add crmsh/corosync_healthcheck.py containing local configuration
    validity, cross-node consistency, quorum status, link status, and Node ID
    mapping validation.
  • Implement ui_cluster.py integration for the 'corosync' health component.
  • Write test/unittests/test_corosync_healthcheck.py and test_ui_cluster.py
    for comprehensive unit test coverage.
  • Update doc/crm.8.adoc with help information and documentation.
  • Add functional behavior tests in test/features/corosync_ui.feature.

@nicholasyang2022

nicholasyang2022 commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator Author

Output examples:

> sudo crm cluster health corosync
[PASS] Validate Corosync Configuration File
[PASS] Validate Corosync Configuration File Consistency
[PASS] Check Quorum Status
[FAIL] Check Corosync Links Status
       Corosync link(s) are not operational:
       Link 1 to node 2 has status 'disconnected'.
       Recommended Action: Check network connectivity and corosync configuration/service on the affected nodes.
[PASS] Check Node ID to Node Name Mapping
> sudo crm cluster health corosync --local --json
{"returncode": 1, "results": [{"check_name": "Validate Corosync Configuration File", "checked_nodes": ["ha-3-1"], "returncode": 0, "result_description": null, "recommended_action": null}, {"check_name": "Check Quorum Status", "checked_nodes": ["ha-3-1"], "returncode": 0, "result_description": null, "recommended_action": null}, {"check_name": "Check Corosync Links Status", "checked_nodes": ["ha-3-1"], "returncode": 1, "result_description": "Corosync link(s) are not operational:\nLink 1 to node 2 has status 'disconnected'.", "recommended_action": "Check network connectivity and corosync configuration/service on the affected nodes."}, {"check_name": "Check Node ID to Node Name Mapping", "checked_nodes": ["ha-3-1"], "returncode": 0, "result_description": null, "recommended_action": null}]}

@nicholasyang2022
nicholasyang2022 force-pushed the feature/corosync-health-check branch 2 times, most recently from 9b8c15e to fdd7e3e Compare July 6, 2026 09:05
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.47170% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.71%. Comparing base (0353d18) to head (0432bcb).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
crmsh/corosync_healthcheck.py 95.28% 10 Missing ⚠️
crmsh/ui_cluster.py 96.22% 2 Missing ⚠️
Additional details and impacted files
Flag Coverage Δ
integration 55.58% <76.98%> (+0.19%) ⬆️
unit 52.92% <92.45%> (+0.44%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
crmsh/ui_cluster.py 73.96% <96.22%> (+1.99%) ⬆️
crmsh/corosync_healthcheck.py 95.28% <95.28%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Introduce the corosync health check under 'crm cluster health corosync'.

- Add crmsh/corosync_healthcheck.py containing local configuration
  validity, cross-node consistency, quorum status, link status, and Node ID
  mapping validation.
- Implement ui_cluster.py integration for the 'corosync' health component.
- Write test/unittests/test_corosync_healthcheck.py and test_ui_cluster.py
  for comprehensive unit test coverage.
- Update doc/crm.8.adoc with help information and documentation.
- Add functional behavior tests in test/features/corosync_ui.feature.
@nicholasyang2022
nicholasyang2022 force-pushed the feature/corosync-health-check branch from fdd7e3e to 0432bcb Compare July 6, 2026 11:12
@nicholasyang2022
nicholasyang2022 marked this pull request as ready for review July 6, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant