[MXS-1027] Add Upstart support (including respawn) for MaxScale Created: 2016-11-27 Updated: 2016-11-29 Resolved: 2016-11-29 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | StartupScripts |
| Affects Version/s: | 2.0.1 |
| Fix Version/s: | 2.0.3 |
| Type: | Task | Priority: | Major |
| Reporter: | Valerii Kravchuk | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| 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):
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. |
| Comments |
| Comment by markus makela [ 2016-11-28 ] | ||||||||||||||||||||||||||
|
I took your suggestion and improved it a bit. The script installs the /var/run/maxscale directory and removes any limits on the number of open files. It also changes the user and group to maxscale making sure that the process gains no root privileges.
| ||||||||||||||||||||||||||
| Comment by markus makela [ 2016-11-29 ] | ||||||||||||||||||||||||||
|
Added Upstart configuration. |