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

Add Upstart support (including respawn) for MaxScale

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.3
    • Component/s: Startup scripts
    • Labels:
      None
    • Environment:
      Linux with Upstart (RHEL/CentOS 6.x, Ubuntu 14.04, others)

      Description

      Please, add Upstart files for MaxScale service on systems that support upstart. It is better to use a native Upstart file (script) instead of old style SysV init scripts.

      Upstart allows to respawn maxscale process after a crash or when it is deliberately killed. It seems respawn action in /etc/inittab does not work on systems with Upstart any more, and any other way to restart maxscale after crash automatically involves coding of additional scripts or using external additional HA frameworks.

      Simple /etc/init/maxscale.conf may look like this (tested on CentOS 6.8 as a proof of concept):

      [root@centos ~]# cat /etc/init/maxscale.conf
      # MaxScale service
       
      description "MaxScale"
       
      start on stopped rc RUNLEVEL=[2345]
      stop on starting rc runlevel [!2345]
       
      respawn
      respawn limit 2 5
       
      expect fork
       
      exec /usr/bin/maxscale --user=maxscale
      

      But probably it misses pre-start script (based on what I see in the /etc/init.d/maxscale) and few more details that should be added and tested, and then maxscale.conf file included into the official packages for the systems using Upstart, with manual/KB pages changed/extended to cover initctl and Upstart usage in general.

        Attachments

          Activity

            People

            • Assignee:
              markus makela markus makela
              Reporter:
              valerii Valerii Kravchuk
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: