linux-system-roles / ha_cluster

Provide automation for Cluster - High Availability management
https://linux-system-roles.github.io/ha_cluster/
MIT License
17 stars 22 forks source link

corosync: Add hidden default options as variables #204

Open marcelmamula opened 4 months ago

marcelmamula commented 4 months ago

Issue: pcs corosync commands currently create corosync file with predefined default values that are not exposed through variables. Example: logging

https://github.com/linux-system-roles/ha_cluster/blob/main/tasks/shell_pcs/pcs-cluster-setup-pcs-0.10.yml does not specify logging, but it is created by default.

Reason:

  1. Allow users to specify logging details during runtime
  2. Enable planned rework of crmsh jinja template to use other existing variables like ha_cluster_totem

Resolution: It would be helpful if variables (ex. like ha_cluster_logging) were added into corosync setup tasks as well as exposed in defaults and Readme.

tomjelinek commented 2 months ago

Hi @marcelmamula,

There are indeed parts of corosync.conf which cannot be currently configured in the role. The reason for this is that those parts cannot be configured with pcs either, so the role has no way to pass those options to corosync.conf. And they cannot be specified in pcs because, well, there wasn't any demand for it, as far as I know.

We may add support for corosync logging configuration options into pcs and consequently into the role, but it's not our top priority right now. Feel free to add those variables into the role if you need them for the crmsh part, though. Pcs will catch up sooner or later.

Are there any other corosync options missing that you are interested in beside logging?

marcelmamula commented 2 months ago

@tomjelinek I was able to complete corosync j2 template rework using other existing variables and logging input is not that important now, as most of logging parameters are good with default corosync values.

We are planning to do some changes to allow for selectable multi-NIC clusters, so we will be investigating if existing code allows for it and how to enhance it (crmsh corosync has 2 rings, but they are predefined with eth0[0] and eth1[0] so I will have to adjust it as well).