-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
bugThis issue/PR relates to a bugThis issue/PR relates to a bugmodulemodulemodulepluginsplugin (any type)plugin (any type)traceback
Description
Summary
Hi @munchtoast,
I’ve encountered a similar issue as previously reported in #10180, now with community.general version 11.0.0, when attempting to create a HAProxy health check resource while the cluster is in maintenance mode.
Issue Type
Bug Report
Component Name
pacemaker_resource
Ansible Version
ansible [core 2.18.4]
Community.general Version
community.general 11.0.0
Configuration
$ ansible-config dump --only-changed
OS / Environment
RHEL 9.x
Steps to Reproduce
Ansible Code:
- name: pcs_resource_healthcheck | Create health check resource
community.general.pacemaker_resource:
name: "{{ hana_sid | upper }}_healthcheck"
resource_type:
resource_name: service:haproxy
resource_operation: - operation_action: monitor
operation_option: - "interval=10s"
- "timeout=20s"
state: present
notify: cluster_setup_pause
Expected Results
resource should get created without any error
Actual Results
Playbook Error:
TASK [clustering_setup_hana : pcs_resource_healthcheck | Create health check resource] **********************************************************************************
skipping: [ABC2]
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible_collections.community.general.plugins.module_utils.mh.exceptions.ModuleHelperException
fatal: [ABC1]: FAILED! => {"changed": false, "msg": "pcs failed with error (rc=1): Waiting for the cluster to apply configuration changes (timeout: 300 seconds)...\nError: resource 'HGC_healthcheck' is not running on any node\nError: Errors have occurred, therefore pcs is unable to continue\n", "output": {"previous_value": null, "value": null}, "previous_value": null, "value": null, "vars": {"previous_value": null, "value": null}}
Full Trace:
TASK [clustering_setup_hana : pcs_resource_healthcheck | Create health check resource] **********************************************************************************
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_community.general.pacemaker_resource_payload_tei4a_ek/ansible_community.general.pacemaker_resource_payload.zip/ansible_collections/community/general/plugins/module_utils/mh/deco.py", line 56, in wrapper
func(self, *args, **kwargs)
File "/tmp/ansible_community.general.pacemaker_resource_payload_tei4a_ek/ansible_community.general.pacemaker_resource_payload.zip/ansible_collections/community/general/plugins/module_utils/mh/base.py", line 93, in run
self.run()
File "/tmp/ansible_community.general.pacemaker_resource_payload_tei4a_ek/ansible_community.general.pacemaker_resource_payload.zip/ansible_collections/community/general/plugins/module_utils/mh/mixins/state.py", line 37, in run
return func()
^^^^^^
File "/tmp/ansible_community.general.pacemaker_resource_payload_tei4a_ek/ansible_community.general.pacemaker_resource_payload.zip/ansible_collections/community/general/plugins/modules/pacemaker_resource.py", line 201, in state_present
File "/tmp/ansible_community.general.pacemaker_resource_payload_tei4a_ek/ansible_community.general.pacemaker_resource_payload.zip/ansible_collections/community/general/plugins/module_utils/cmd_runner.py", line 223, in run
self.results_processed = self.output_process(*results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/ansible_community.general.pacemaker_resource_payload_tei4a_ek/ansible_community.general.pacemaker_resource_payload.zip/ansible_collections/community/general/plugins/modules/pacemaker_resource.py", line 177, in process
File "/tmp/ansible_community.general.pacemaker_resource_payload_tei4a_ek/ansible_community.general.pacemaker_resource_payload.zip/ansible_collections/community/general/plugins/module_utils/mh/base.py", line 53, in do_raise
raise _MHE(*args, **kwargs)
ansible_collections.community.general.plugins.module_utils.mh.exceptions.ModuleHelperException
fatal: [ABC1]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"name": "HGC_healthcheck",
"resource_argument": null,
"resource_meta": null,
"resource_operation": [
{
"operation_action": "monitor",
"operation_option": [
"interval=10s",
"timeout=20s"
]
}
],
"resource_option": [],
"resource_type": {
"resource_name": "service:haproxy",
"resource_provider": null,
"resource_standard": null
},
"state": "present",
"wait": 300
}
},
"msg": "pcs failed with error (rc=1): Waiting for the cluster to apply configuration changes (timeout: 300 seconds)...\nError: resource 'HGC_healthcheck' is not running on any node\nError: Errors have occurred, therefore pcs is unable to continue\n",
"output": {
"previous_value": null,
"value": null
},
"previous_value": null,
"value": null,
"vars": {
"previous_value": null,
"value": null
}
}
Full Trace After Rerun:
TASK [clustering_setup_hana : pcs_resource_healthcheck | Create health check resource] **********************************************************************************
ok: [ABC1] => {
"changed": false,
"cmd": [
"/sbin/pcs",
"resource",
"create",
"HGC_healthcheck",
"service:haproxy",
"op",
"monitor",
"interval=10s",
"timeout=20s",
"--wait=300"
],
"invocation": {
"module_args": {
"name": "HGC_healthcheck",
"resource_argument": null,
"resource_meta": null,
"resource_operation": [
{
"operation_action": "monitor",
"operation_option": [
"interval=10s",
"timeout=20s"
]
}
],
"resource_option": [],
"resource_type": {
"resource_name": "service:haproxy",
"resource_provider": null,
"resource_standard": null
},
"state": "present",
"wait": 300
}
},
"previous_value": " * HGC_healthcheck\t(service:haproxy):\t Stopped (unmanaged)",
"stderr": "Error: 'HGC_healthcheck' already exists\n",
"stderr_lines": [
"Error: 'HGC_healthcheck' already exists"
],
"stdout": "",
"stdout_lines": [],
"value": " * HGC_healthcheck\t(service:haproxy):\t Stopped (unmanaged)"
}
Code of Conduct
- I agree to follow the Ansible Code of Conduct
Metadata
Metadata
Assignees
Labels
bugThis issue/PR relates to a bugThis issue/PR relates to a bugmodulemodulemodulepluginsplugin (any type)plugin (any type)traceback