Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
2.0.1
-
None
-
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.