Details
-
New Feature
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
1.2.1
-
None
Description
Please add a component: packaging
Note: please add a version 1.2.0 as this issue affects maxscale-1.2.0-x86_64-rhel6.rpm.
I want to use syslog to log maxscale behaviour. To do so requires changing the maxscale startup. When using rpm packaging you provide no facility to override the default startup option which is:
daemon --pidfile $MAXSCALE_PIDFILE /usr/bin/maxscale --user=maxscale >& /dev/null
So option settings described here https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale/maxscale-administration-tutorial/ can not be set.
Suggestion: add a patch with something like this:
$ diff -u /etc/init.d/maxscale.ORIG /etc/init.d/maxscale
— /etc/init.d/maxscale.ORIG 2015-08-10 13:31:58.000000000 +0200
+++ /etc/init.d/maxscale 2015-08-10 13:26:29.000000000 +0200
@@ -43,6 +43,9 @@
- Source function library.
. /etc/rc.d/init.d/functions
+# Source networking configuration.
+[ -f /etc/sysconfig/maxscale ] && . /etc/sysconfig/maxscale
+
- we can rearrange this easily
processname=maxscale
servicename=maxscale
@@ -55,7 +58,7 @@
CHECK_RET=$?
[ $CHECK_RET -eq 0 ] && echo -n " found $my_check" && success && CHECK_RET=0
- daemon --pidfile $MAXSCALE_PIDFILE /usr/bin/maxscale --user=maxscale >& /dev/null
+ daemon --pidfile $MAXSCALE_PIDFILE /usr/bin/maxscale $MAXSCALE_OPTIONS --user=maxscale >& /dev/null
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename
Provide a default /etc/sysconfig/maxscale file which would be empty:
- maxscale startup options
#
In my case I'll be using something like this:
- maxscale startup options
MAXSCALE_OPTIONS="--syslog=yes --maxscalelog=no"
and then make sure in the rpm configuration that if this file is changed by a DBA/sysadmin that it's not overwritten using something like:
%attr(0644, root, root) %config(noreplace) /etc/sysconfig/maxscale
This change avoids me having to change each rpm's /etc/init.d/maxscale (as it won't behave the way I need), and probably also help others with similar requirements (special configs) while not affecting the default user.
Attachments
Issue Links
- relates to
-
MXS-70 Allow configuring modules dynamically without process restart
- Closed