[MXS-302] Allow maxscale startup configuration to be controlled on rpms via /etc/sysconfig/maxscale Created: 2015-08-10 Updated: 2017-12-01 Resolved: 2015-10-04 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | Packaging |
| Affects Version/s: | 1.2.1 |
| Fix Version/s: | 1.3.0 |
| Type: | New Feature | Priority: | Minor |
| Reporter: | Simon J Mudd | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Please add a component: packaging 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
+# Source networking configuration.
RETVAL=$? Provide a default /etc/sysconfig/maxscale file which would be empty:
In my case I'll be using something like this:
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. |
| Comments |
| Comment by Simon J Mudd [ 2015-08-10 ] | ||||||||
|
JIRA seems to have munged my patch a bit. I hope it is clear. | ||||||||
| Comment by markus makela [ 2015-08-10 ] | ||||||||
|
There is work already in progress which enables controlling the logging mechanism through the maxscale.cnf file on the | ||||||||
| Comment by Simon J Mudd [ 2015-08-11 ] | ||||||||
|
This is not just about logging. I've been trying to use the standard /etc/init.d/maxscale init script and finding that with some binaries built to use different directories I needed to be able to modify the options passed to /usr/bin/maxscale on startup. So please don't dismiss this as a logging issue only. To give you an idea I currently have my "patched" /etc/init.d/maxscale setup to read from /etc/sysconfig/maxscale which has the following content:
This is only because I built maxscale with the wrong paths but the point is if I wanted to use different locations then this seems like a convenient way to do that. Sometimes people will want to use this mechanism and other times using /etc/maxscale.cnf (you mention logging but other startup options make sense in /etc/maxscale.cnf too[1]). [1] or you set the maxscale.cnf path and then allow that to configure all options. Give us the freedom to choose what makes most sense. Note: if you add this flexibility it would be convenient to make startup logging show clearly which values are being used for these settings. | ||||||||
| Comment by markus makela [ 2015-08-11 ] | ||||||||
|
The ongoing work has added all the values controllable via command line also to be via the configuration file. Here is a small example of the new funcionality. Here all the values (except of course the configuration file location) are defined via the configuration file.
| ||||||||
| Comment by Simon J Mudd [ 2015-08-11 ] | ||||||||
|
Hi Markus, Good news. Is the trailing "/" required, optional or best left out ? | ||||||||
| Comment by markus makela [ 2015-08-12 ] | ||||||||
|
The trailing slash is optional since all of the options are interpreted as directories. | ||||||||
| Comment by Dipti Joshi (Inactive) [ 2015-08-18 ] | ||||||||
|
markus makela Since you are following this Issue, assigned it to you. Can you please add link to the issue whose fix in develop branch is addressing what Simon is asking here ? Thanks, | ||||||||
| Comment by Simon J Mudd [ 2015-09-18 ] | ||||||||
|
See also: https://github.com/mariadb-corporation/MaxScale/pull/92 |