Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing semi-colon in garbd's option parsing code prevents the -w/WORK_DIR parameter to work properly and be used at all. #672

Open
abelhouane opened this issue Jan 26, 2025 · 0 comments

Comments

@abelhouane
Copy link

abelhouane commented Jan 26, 2025

As of Galera 26.4.21 and probably since the feature was added in Galera 4, one gets this error when trying to run garbd with -w /tmp or the env variableWORK_DIR=/tmp :

Jan 26 12:38:33 deb12-ga systemd[1]: Started garb.service - Galera Arbitrator Daemon.
Jan 26 12:38:33 deb12-ga garb-systemd[475]: Starting garbd
Jan 26 12:38:33 deb12-ga garb-systemd[477]: 2025-01-26 12:38:33.448  INFO: CRC-32C: using 64-bit x86 acceleration.
Jan 26 12:38:33 deb12-ga garb-systemd[477]: 2025-01-26 12:38:33.448  INFO: Read config:
Jan 26 12:38:33 deb12-ga garb-systemd[477]:         daemon:  0
Jan 26 12:38:33 deb12-ga garb-systemd[477]:         name:    garb
Jan 26 12:38:33 deb12-ga garb-systemd[477]:         address: gcomm://10.0.5.11,10.0.5.12,10.0.5.13
Jan 26 12:38:33 deb12-ga garb-systemd[477]:         group:   mycluster
Jan 26 12:38:33 deb12-ga garb-systemd[477]:         sst:     trivial
Jan 26 12:38:33 deb12-ga garb-systemd[477]:         donor:
Jan 26 12:38:33 deb12-ga garb-systemd[477]:         options: gcs.fc_limit=9999999; gcs.fc_factor=1.0; gcs.fc_single_primary=yes base_dir=/tmp;
Jan 26 12:38:33 deb12-ga garb-systemd[477]:         cfg:
Jan 26 12:38:33 deb12-ga garb-systemd[477]:         workdir: /tmp
Jan 26 12:38:33 deb12-ga garb-systemd[477]:         log:
Jan 26 12:38:33 deb12-ga garb-systemd[477]: 2025-01-26 12:38:33.448 FATAL: Exception in creating receive loop: More than one value for key 'gcs.fc_single_primary' at ' gcs.fc_single_primary=yes base_dir=/tmp' in parameter list.
Jan 26 12:38:33 deb12-ga garb-systemd[477]:          at ./galerautils/src/gu_config.cpp:parse():52
Jan 26 12:38:33 deb12-ga systemd[1]: garb.service: Main process exited, code=exited, status=1/FAILURE
Jan 26 12:38:33 deb12-ga systemd[1]: garb.service: Failed with result 'exit-code'.

Because of a missing ; the internally built configuration gcs.fc_single_primary=yes base_dir=/tmp is interpreted as a single parameter instead of having gcs.fc_single_primary=yes; base_dir=/tmp for the two distincts parameters.

I believe this bug happened during the resolution of a conflicting merge in the following commit:

1d7c284 ("Merge branch 'garb-fixes-3.x' into garb-fixes-4.x")

between these two commits:

29d906e ("Add command line option to specify desired working directory where")

where the semi-colon does get added:

- options_ += "gcs.fc_limit=9999999; gcs.fc_factor=1.0; gcs.fc_master_slave=yes";
+ options_ += "gcs.fc_limit=9999999; gcs.fc_factor=1.0; gcs.fc_master_slave=yes;";

and

b3c4983 ("Fix renaming of fc_master_slave to fc_single_primary. In particular don't")

whose part changing the same place for a different purpose didn't have the semi-colon which finally got lost in the merge.

- options_ += "gcs.fc_limit=9999999; gcs.fc_factor=1.0; gcs.fc_master_slave=yes";
+ options_ += "gcs.fc_limit=9999999; gcs.fc_factor=1.0; gcs.fc_single_primary=yes";

Could you ensure 29d906e 's intent gets really applied and put back the missing ;? I tested that doing so (and rebuilding) does fix the issue and allows to use -w / WORK_DIR with garbd.


Note: to be transparent, although without details, somebody else already reported this in the past in this pull request: #641

I'm also working on submitting this to the Debian project in this merge request:

https://salsa.debian.org/mariadb-team/galera-4/-/merge_requests/31

ottok pushed a commit to ottok/galera that referenced this issue Jan 26, 2025
This gets gvwstate.dat (cluster state) in a writable directory correctly.

Closes: codership#672
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant