[debian-mysql] Bug#1088076: galera-arbitrator-4: The -w/WORK_DIR feature doesn't work because of a missing comma in the configuration code
Adel Belhouane
bugs.a.b at free.fr
Fri Nov 22 20:24:04 GMT 2024
Package: galera-arbitrator-4
Version: 26.4.20-0+deb12u1
Severity: normal
Tags: upstream patch
X-Debbugs-Cc: bugs.a.b at free.fr
Dear Maintainer,
Setting the WORK_DIR env variable in /etc/default/garb (involving the
use of garbd's not very documented -w option), in order to have a
cluster tracking file on the arbitrator system prevents garbd to
start, with these typical error lines:
Nov 22 19:10:32 deb12-ga garb-systemd[940]: options: gcs.fc_limit=9999999; gcs.fc_factor=1.0; gcs.fc_single_primary=yes base_dir=/tmp;
Nov 22 19:10:32 deb12-ga garb-systemd[940]: cfg:
Nov 22 19:10:32 deb12-ga garb-systemd[940]: workdir: /tmp
Nov 22 19:10:32 deb12-ga garb-systemd[940]: log:
Nov 22 19:10:32 deb12-ga garb-systemd[940]: 2024-11-22 19:10:32.073 FATAL: Exception in creating receive loop: More than one value for key 'gcs.fc_single_primary' at '>
Nov 22 19:10:32 deb12-ga garb-systemd[940]: at ./galerautils/src/gu_config.cpp:parse():52
Nov 22 19:10:32 deb12-ga systemd[1]: garb.service: Main process exited, code=exited, status=1/FAILURE
Nov 22 19:10:32 deb12-ga systemd[1]: garb.service: Failed with result 'exit-code'.
Actually garbd's C++ code builds an internal option string similar to
mariadb ('s galera-4 plugin) 's wsrep_provider_options. It simply
fails to add a comma separator between gcs.fc_single_primary=yes (a
fixed option always set internally) and the base_dir= option.
I couldn't find a workaround without recompiling galera-arbitrator-4
and adding the missing comma.
Doing this makes the -w/WORK_DIR option behave as intented
I believe this error has always been here but there weren't any
complains about it.
I initially considered reporting this upstream but didn't attempt it
when I discovered this had already been reported (with a very similar
fix) there more than a year ago without result:
https://github.com/codership/galera/pull/641
-- System Information:
Debian Release: 12.8
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.11.6-amd64 (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages galera-arbitrator-4 depends on:
ii libboost-program-options1.74.0 1.74.0+ds1-21
ii libc6 2.36-9+deb12u9
ii libgcc-s1 12.2.0-14
ii libssl3 3.0.15-1~deb12u1
ii libstdc++6 12.2.0-14
galera-arbitrator-4 recommends no packages.
galera-arbitrator-4 suggests no packages.
-- Configuration Files:
/etc/default/garb changed:
GALERA_NODES="10.0.5.11,10.0.5.12,10.0.5.13"
GALERA_GROUP="mycluster"
WORK_DIR="/tmp"
-- no debconf information
-------------- next part --------------
diff --git a/garb/garb_config.cpp b/garb/garb_config.cpp
index ec7650a5..e2192271 100644
--- a/garb/garb_config.cpp
+++ b/garb/garb_config.cpp
@@ -146,7 +146,7 @@ Config::Config (int argc, char* argv[])
options_ += "gcs.fc_limit=9999999; gcs.fc_factor=1.0; gcs.fc_single_primary=yes";
if (!workdir_.empty())
{
- options_ += " base_dir=" + workdir_ + ";";
+ options_ += "; base_dir=" + workdir_ + ";";
}
// this block must be the very last.
More information about the pkg-mysql-maint
mailing list