-
Notifications
You must be signed in to change notification settings - Fork 13
Updated commands to get the automated-register and priority fencing delay #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated commands to get the automated-register and priority fencing delay #122
Conversation
… use new parameters
…elated logic across multiple files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds support for retrieving cluster parameter priority-fencing-delay alongside AUTOMATED_REGISTER, refactors HANA resource handling by splitting a single hana_resource_name into distinct clone and primitive resource names, and restructures provider-specific validation logic in get_pcmk_properties_scs. Key adjustments cascade through Ansible tasks, tests, and command definitions.
- Split hana_resource_name into hana_clone_resource_name and hana_primitive_resource_name across modules, tasks, and tests
- Added retrieval and exposure of PRIORITY_FENCING_DELAY and refactored AUTOMATED_REGISTER retrieval
- Introduced helper methods for provider value resolution in get_pcmk_properties_scs
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
tests/roles/mock_data/get_cluster_status_db.txt | Updated mock to include new resource params and PRIORITY_FENCING_DELAY |
tests/roles/mock_data/secondary_get_cluster_status_db.txt | Same as above for secondary scenario |
tests/modules/get_cluster_status_db_test.py | Adjusted tests to new method name and params (with a misspelling) |
tests/modules/get_pcmk_properties_scs_test.py | Removed leftover debug print |
tests/roles/ha_db_hana/*_test.py | Updated command names to separated clone/primitive resource retrieval |
src/vars/input-api.yaml | Added separate primitive and clone resource ID command entries |
src/roles/misc/tasks/pre-validations-db.yml | Refactored resource ID discovery to set both clone and primitive names |
src/roles/misc/tasks/cluster-report.yml | Propagated new resource parameter names |
src/roles/ha_db_hana/tasks/*.yml | Replaced hana_resource_name with split clone/primitive names and added usage in cluster status calls |
src/roles/ha_db_hana/tasks/block-network.yml | Added priority-fencing-delay assertions and reporting |
src/roles/ha_db_hana/tasks/files/constants.yaml | Removed duplicate GLOBAL_INI key |
src/modules/get_cluster_status_db.py | Refactored parameter retrieval method and resource name handling (method name misspelled) |
src/module_utils/commands.py | Replaced AUTOMATED_REGISTER constant with lambda and added PRIORITY_FENCING_DELAY command |
src/modules/get_pcmk_properties_scs.py | Added helper methods for provider-based value resolution |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 26 out of 26 changed files in this pull request and generated 6 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…and fix typo in test case name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
* Bump requests from 2.32.4 to 2.32.5 (#105) * Bump requests from 2.32.4 to 2.32.5 (#106) * Updated logic for HA DB/SCS cluster configuration validation (#114) * Restructure the documents for high availability testing (#116) * Bump pandas from 2.3.1 to 2.3.3 (#118) Bumps [pandas](https://github.com/pandas-dev/pandas) from 2.3.1 to 2.3.3. - [Release notes](https://github.com/pandas-dev/pandas/releases) - [Commits](pandas-dev/pandas@v2.3.1...v2.3.3) --- updated-dependencies: - dependency-name: pandas dependency-version: 2.3.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Devansh Jain <86314060+devanshjainms@users.noreply.github.com> * Updated commands to get the automated-register and priority fencing delay (#122) * Add provider value resolution and enhance parameter status determination logic * Refactor cluster parameter retrieval logic and update related tests * Refactor command imports and update cluster status retrieval logic to use new parameters * Refactor HANA resource handling by renaming parameters and updating related logic across multiple files * Refactor command execution logic to simplify parameter value retrieval * Fix typo in method name and update related test cases for cluster parameter retrieval * Fix inconsistent quote style in test case for cluster parameter retrieval * Update cluster parameter retrieval to include PRIORITY_FENCING_DELAY and fix typo in test case name --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This pull request introduces several improvements and refactoring to the cluster status and resource validation logic, with a focus on better handling of resource parameters and provider-specific configurations. The main changes include refactoring the way HANA resource names are passed and used, adding support for retrieving and validating the
priority-fencing-delay
cluster parameter, and simplifying provider-based value resolution for resource validation.Cluster Status Parameter Handling
get_cluster_status_db.py
by splitting the singlehana_resource_name
parameter intohana_clone_resource_name
andhana_primitive_resource_name
for more precise resource identification. All related Ansible task files were updated to use the new parameters. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]AUTOMATED_REGISTER
and the newPRIORITY_FENCING_DELAY
parameters, storing them in the result dictionary for downstream use and validation. [1] [2] [3] [4] [5] [6]Provider-Specific Resource Validation
get_pcmk_properties_scs.py
by introducing helper methods_resolve_provider_values
,_extract_values_from_config
, and_compare_value_with_expectations
. This makes provider-specific validation more robust and easier to maintain. [1] [2]Minor Fixes and Cleanups
constants.yaml
file forGLOBAL_INI
to ensure proper configuration loading.These changes improve the clarity, maintainability, and extensibility of cluster resource parameter handling and validation logic.