OndrejHome/ansible.ha-cluster-pacemaker

Feature request: Coroync totem timeout support in the role

Closed this issue · 2 comments

jbe-dw commented

Hello again,

We have had some hard time with the default timeouts in corosync that were triggering cluster disjoins and some weird scenario with Pacemaker. We increased both totem timeout value and totem consensus value accordingly on the servers.

We could see that your modules does support at least the totem timeout but it is not implemented in the role.

I'd like to know if it is something that can be added (either you, or I by doing a PR) ?

Thank you

Hi @jbe-dw,

Thank you for raising interesting point. You are right that totem timeout is implemented in pcs_cluster module that creates the cluster. The totem consensus is not implemented and in majority of use cases I have not seen people modifying it. It defaults to 1.2x totem token so changing the totem token should get it right usually.

As for the role I want to keep it simple if possible and I don't expose all features from pcs_* modules. However there is a simple way how to modify totem token without changing the role. Please have a look at playbook below.

---
- hosts: cluster
  remote_user: root
  module_defaults:
    pcs_cluster:
      token: 13000
  roles:
    - ondrejhome.ha-cluster-pacemaker
# grep token /etc/corosync/corosync.conf
    token: 13000

Do you think that above would be good enough solution for your use case?

If you would like to change both 'totem token' and 'totem consensus' values to your custom values, that would require the pcs_cluster module change to get 'totem consensus' setting into it first - and also checking from which version of pcs that change is available for completeness.

Please let me know if above example playbook works for you and if you would like to see the 'totem consensus' value support in pcs_cluster module (at pcs_cluster module change I can have a look around the end of this month at earliest).

Thank you!

jbe-dw commented

Well I didn't know about module_defaults directive, thank you for this !

Yes it can definitely do the trick !