Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-302

Allow maxscale startup configuration to be controlled on rpms via /etc/sysconfig/maxscale

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 1.2.1
    • 1.3.0
    • Packaging
    • 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 @@

      1. Source function library.
        . /etc/rc.d/init.d/functions

      +# Source networking configuration.
      +[ -f /etc/sysconfig/maxscale ] && . /etc/sysconfig/maxscale
      +

      1. 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:

      1. maxscale startup options
        #

      In my case I'll be using something like this:

      1. 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

          Activity

            People

              markus makela markus makela
              simon.mudd Simon J Mudd
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.