Skip to content

Conversation

@devanshjainms
Copy link
Contributor

@devanshjainms devanshjainms commented Mar 21, 2025

Description

This pull request includes changes to improve the handling of the STONITH (Shoot The Other Node In The Head) action retrieval and its associated tests. The main changes involve modifying the logic for determining the STONITH action and updating the corresponding tests to ensure proper functionality.

Improvements to STONITH action retrieval:

  • src/module_utils/get_cluster_status.py: Modified the _get_stonith_action method to initialize the stonith_action to "unknown" and updated the logic to check for specific actions ("reboot", "poweroff", "off") within the command output. Added logging for exceptions.

Updates to tests:

  • tests/module_utils/get_cluster_status_test.py: Renamed the test_get_stonith_action method to test_get_stonith_action_rhel94 and added a new test_get_stonith_action method to handle different return values. Updated the tests to assert the correct stonith_action based on the command output.

Problem Statement

In RHEL94, we found that the STONITH action retrieval logic was not handling certain command output correctly, leading to incorrect action determination.
Until RHEL92 the command output had ":", from RHEL94, the command output now includes "=".

Solution Details

  • Implementation changes

  • Configuration updates

  • Documentation updates

  • OS: RHEL 9.4

  • Database Type: HANA

Test Cases

  • Unit tests added/updated
  • Manual Testing done

Checklist

  • Code follows project style guidelines
  • Documentation has been updated
  • Tests are passing
  • PR title follows conventional commit format
  • Breaking changes are clearly marked

@devanshjainms devanshjainms requested a review from a team as a code owner March 21, 2025 18:08
@devanshjainms devanshjainms requested review from KimForss, dennispadia and hdamecharla and removed request for KimForss March 21, 2025 18:08
@hdamecharla hdamecharla self-assigned this Mar 24, 2025
Copy link
Member

@hdamecharla hdamecharla left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@hdamecharla hdamecharla merged commit c59e0b9 into Azure:main Mar 24, 2025
9 checks passed
@hdamecharla hdamecharla deleted the stonith-action-fix branch March 24, 2025 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants