Bug 236795 - databases/galera 'garb_galera_options' not working with multiple options
Summary: databases/galera 'garb_galera_options' not working with multiple options
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs mailing list
Depends on:
Reported: 2019-03-26 00:14 UTC by TAO ZHOU
Modified: 2020-02-13 13:59 UTC (History)
2 users (show)

See Also:

patch for databases/galera (584 bytes, patch)
2020-02-12 11:38 UTC, Frank Wall
fw: maintainer-approval?
Details | Diff
patch for databases/galera26 (588 bytes, patch)
2020-02-12 11:39 UTC, Frank Wall
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description TAO ZHOU 2019-03-26 00:14:57 UTC
The garbd options are semicolon separated key value pairs.
The current rc.d script does not support multiple options(eg. "gmcast.listen_addr=tcp://;pc.weight=1")

The variable garb_galera_options need to be quoted in command line.

I've fixed it with the following changes

--- garb.sh.in.orig	2019-03-26 11:08:18.383489000 +1100
+++ garb.sh.in	2019-03-26 11:07:20.345938000 +1100
@@ -71,7 +71,7 @@

 	command_args="$command_args -a gcomm://$ADDRESS"
 	[ -n "$garb_galera_group" ]   && command_args="$command_args -g $garb_galera_group"
-	[ -n "$garb_galera_options" ] && command_args="$command_args -o $garb_galera_options"
+	[ -n "$garb_galera_options" ] && command_args="$command_args -o '$garb_galera_options'"
 	[ -n "$garb_log_file" ]       && command_args="$command_args -l $garb_log_file"
 	return 0
Comment 1 Bugzilla Automation freebsd_committer 2019-03-26 00:14:57 UTC
Maintainer informed via mail
Comment 2 Frank Wall 2020-02-12 11:36:47 UTC
I can confirm this issue. When using the semicolon separated syntax for garb_galera_options, the following error will be shown:

# service garb start
Starting garb.
eval: gcs.fc_factor=0.99: not found
eval: gcs.fc_master_slave=YES: not found
eval: evs.keepalive_period=PT1S: not found
eval: evs.suspect_timeout=PT1M: not found

The proposed fix is working for me. I've attached patches for both ports databases/galera and databases/galera26.
Comment 3 Frank Wall 2020-02-12 11:38:28 UTC
Created attachment 211585 [details]
patch for databases/galera
Comment 4 Frank Wall 2020-02-12 11:39:10 UTC
Created attachment 211586 [details]
patch for databases/galera26