Skip to content
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

sap_ha_pacemaker_cluster - sap_ha_pacemaker_cluster_fence_options #370

Closed
waorb opened this issue May 3, 2023 · 2 comments
Closed

sap_ha_pacemaker_cluster - sap_ha_pacemaker_cluster_fence_options #370

waorb opened this issue May 3, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@waorb
Copy link

waorb commented May 3, 2023

The README seems to imply that you can extend the sap_ha_pacemaker_cluster_fence_options variable with any additional options you need.
For example, in our environment, we need the two additional options at the bottom of this variable definition:

sap_ha_pacemaker_cluster_fence_options:
  pcmk_reboot_retries: 4
  pcmk_reboot_timeout: 600
  power_timeout: 240
  pcmk_monitor_timeout: 600
  pcmk_status_timeout: 60

However, when I try to run the role, it fails in the argument validation task:

TASK [redhat.sap_install.sap_ha_pacemaker_cluster : Validating arguments against arg spec 'main' - SAP HA automated cluster setup requirements]
fatal: [wo-cl-h01-1]: FAILED! => {"argument_errors": ["sap_ha_pacemaker_cluster_fence_options.pcmk_monitor_timeout, sap_ha_pacemaker_cluster_fence_options.pcmk_status_timeout. Supported parameters include: pcmk_reboot_retries, pcmk_reboot_timeout, power_timeout."], "argument_spec_data": {"ha_cluster": {"description": ["Optional _**host_vars**_ parameter - if defined it must be set for each node.", "Dictionary that can contain various node options for the pacemaker cluster configuration."

I suspect the problem is, that in meta/argument_specs.yml , the variable sap_ha_pacemaker_cluster_fence_options is defined with an additional options parameter. And within that options parameter, the three default pcmk.... option are defined.
It looks like whenever the options parameter is defined, the argument check validates whether the supplied parameters match one of the options.
In my case, it fails as the pcmk_monitor_timeout and pcmk_status_timeout parameters are not defined in the options parameter.

As soon as I take those two parameters out from the variable definition, the validation check runs without a problem.

The counter-example is the sap_ha_pacemaker_cluster_cluster_properties variable. I've added another option to that variable and this passes the check just fine.
The difference seems to be that this variables doesn't have the additional options parameter defined in the argument_specs.yml file

@ja9fuchs ja9fuchs added the bug Something isn't working label May 3, 2023
@ja9fuchs ja9fuchs self-assigned this May 3, 2023
ja9fuchs added a commit to ja9fuchs/community.sap_install that referenced this issue May 3, 2023
@ja9fuchs
Copy link
Contributor

ja9fuchs commented May 3, 2023

Another good catch, thanks!

You are correct, the parameter can be enhanced with custom options, which should be added correctly to the resource configuration.
argument_specs validation is indeed very strict and will not accept more options than those described.

sean-freeman added a commit that referenced this issue May 3, 2023
sap_ha_pacemaker_cluster: fix issue #370 - argument_specs limitation
@ja9fuchs
Copy link
Contributor

ja9fuchs commented May 8, 2023

Confirmed to be fixed.

@ja9fuchs ja9fuchs closed this as completed May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants