community.general icon indicating copy to clipboard operation
community.general copied to clipboard

community.general.pacemaker_cluster module enhancement and maintenance mode feature

Open munchtoast opened this issue 6 months ago • 3 comments

Summary

Aligning community.general.pacemaker_cluster with the module utils for pacemaker will be helpful in maintaining the module. Unit tests should be added for the module, with the addition of supporting maintenance mode which can be beneficial for users that need to manage the cluster without enforcing pacemaker lifecycle.

In summary, the following action items associated with this issue:

  • [ ] Enhance pacemaker_cluster to utilize module_utils/pacemaker
  • [ ] Add feature for pacemaker_cluster which enables the module to manage maintenance mode for the cluster
  • [ ] Add unit tests for pacemaker_cluster
  • [ ] Potentially add in support for integration testing (This may or may not be possible? See below.)

Integration testing:

I initially wanted to add this for pacemaker_resource but was running into issues with setting the cluster up. I'm currently using pcs in a Vagrant test environment (with a docker image supporting pcs) so I believe there might be potential in enabling integration testing here. Furthermore, pacemaker_cluster can be useful for other pacemaker modules if integration testing is feasible.

Issue Type

Feature Idea

Component Name

pacemaker_cluster

Additional Information

The addition of a new state: maintenance:

- name: Enable maintenance mode
  community.general.pacemaker_cluster:
    state: maintenance

- name: Bring the cluster online and disable maintenance mode
  community.general.pacemaker_cluster:
    state: online

The idea is that maintenance mode can stop pacemaker lifecycle management. Additionally, bringing the cluster online implies that pacemaker can resume lifecycle management.

Code of Conduct

  • [x] I agree to follow the Ansible Code of Conduct

munchtoast avatar Jun 04 '25 16:06 munchtoast

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot avatar Jun 04 '25 16:06 ansibullbot

cc @matbu click here for bot help

ansibullbot avatar Jun 04 '25 16:06 ansibullbot

Sorry for ping, I just wanted to create this issue and see if it was fine for me to proceed with writing this out? I'll create another PR with some PoC

munchtoast avatar Jun 04 '25 16:06 munchtoast