ClusterLabs / ClusterLabs/resource-agents

Galera RA more consistent parameters

Open
#1,104 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
519
Forks
608
Avg merge
6d 1h
Merged PRs (30d)
7

Description

Hi,

I would like to have a small change in ocf:hea rtbeat:galera so that the same separator charachter(s) are used in variable values for "wsrep_cluster_address=" (currently uses a comma for separating nodes) and "cluster_host_map=" (currently uses semicolon). It took me a while to find this frustrating difference,

My suggestion is to amend the code on lines 466 and 476 in functions galera_to_pcmk_name() resp. pcmk_to_galera_name() with a comma, (",") after the existing semicolon (";") in the first "tr" selection. The final result(s) would be:

Line 466: echo "$OCF_RESKEY_cluster_host_map" | tr ';,' '\n' | tr -d ' ' | sed 's/:/ /' | awk -F' ' '$2=="'"$galera"'" {print $1;exit}'

Line 476: echo "$OCF_RESKEY_cluster_host_map" | tr ';,' '\n' | tr -d ' ' | sed 's/:/ /' | awk -F' ' '$1=="'"$pcmk"'" {print $2;exit}'

Also, when used for MariaDB, the "pid=" variable needs to be adjusted for MariaDB as it is different from the default MySQL. I suggest that it gets mentioned in the description.

Thank you for your excellent effort,

//Tamas

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the Galera resource-agent code containing galera_to_pcmk_name() and pcmk_to_galera_name(), especially the lines using tr for cluster_host_map. Check how separators are parsed and update the behavior to match the issue's examples; done means both mappings accept the same separators and the description mentions MariaDB's different pid setting.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, shell
Domain
databases
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.