Feature #2014
Service supervision with Upstart
Status: | CLOSED | Start date: | 11/15/2013 | |
---|---|---|---|---|
Priority: | Normal | Due date: | 11/15/2013 | |
Assignee: | - | % Done: | 100% | |
Category: | nethserver-lib | |||
Target version: | v6.5-beta3 | |||
Resolution: | NEEDINFO: | No |
Description
A critical service (like slapd
) needs a supervisor to start the service in case of accidental crash.
Currently runlevel-adjust
action enables/disables init.d/
scripts and executes service start/stop
commands.
This new feature should disable init.d/
scripts and provide an implementation for daemon starting, stopping and supervision, based on Upstart
The implementation must be extensible to support systemd, the substitute of Upstart, available in RHEL7.
Related issues
Associated revisions
Upstart configuration for httpd-admin. Refs #2014
Use Upstart for ntopng daemon control. Refs #2014
The Upstart configuration coming with ntopng RPM does not handle fork
expectation correctly. This configuration avoid the startup fork() and
fixes the problem.
Added upstart-job template. Refs #2014
This is a generic upstart job configuration template that can be
instantiated from templates.metadata.
Implemented Upstart service supervison. Refs #2014
If an upstart job configuration is present for a given service, SysV
init scripts are disabled and all service actions
(start/stop/restart/reload/status) are executed by initctl.
slapd and nslcd configuration for Upstart. Refs #2014
Escape dash chars in DBus paths of Upstart jobs. Refs #2014
Fix service names containing "-" for dbus-send invocation,
substituting "-" with "_2d".
Added read-service-status helper for Dashboard UI module. Refs #2014
This helper script prints out all services status in JSON format,
relying on NethServer::Service Perl module. Using the helper the
Dashboard UI module is unaware of the underlying implementation of the
service control (SysV, Upstart...).
Create /etc/ntopng directory for ntopng configuration. Refs #2014
Stop daemon and disable SysV script if defined also in Upstart. Refs #2014
Wait for nslcd to complete startup. Refs #2014
httpd-admin graceful restart on nethserver-samba-update. Refs #2014
Activate httpd-admin configuration for Win registry patches.
History
#1 Updated by Filippo Carletti almost 8 years ago
- Target version changed from ~FUTURE to v6.5-beta3
#3 Updated by Davide Principi over 7 years ago
- Due date set to 11/15/2013
- Status changed from NEW to TRIAGED
- Start date set to 11/15/2013
- % Done changed from 0 to 20
- Estimated time set to 8.00
#4 Updated by Davide Principi over 7 years ago
- Assignee set to Davide Principi
#5 Updated by Davide Principi over 7 years ago
- Status changed from TRIAGED to ON_DEV
- % Done changed from 20 to 30
#6 Updated by Davide Principi over 7 years ago
- Subject changed from Base: service supervision with upstart to Service supervision with Upstart
- Description updated (diff)
- Status changed from ON_DEV to MODIFIED
- Assignee deleted (
Davide Principi) - % Done changed from 30 to 60
Modified
- nethserver-lib
The NethServer::Service Perl module was modified to manage both SysV scripts and Upstart jobs. An Upstart job take precedence over a SysV script with the same name. A generic Upstart job template,upstart-job
was added: it can be instantiated fromtemplates.metadata
, providing actual values inMORE_DATA
(seeesmith::templates
for more details). - nethserver-ntopng
An Upstart job definition comes with thentopng
RPM, but was not working in our setup: it has been fixed. See Upgrade-script-64rc1 release notes. - nethserver-directory
slapd
andnslcd
daemons are now Upstart jobs.nslcd
starts afterslapd
and stops beforeslapd
is stopped. - nethserver-httpd-admin
The SysVhttpd-admin
script was removed: now it uses an Upstart job. A specificreload
job actually sends SIGUSR1 (graceful restart). - nethserver-base
Changed Dashboard/Service UI module
Test case
The system behaviour must not change:- check slapd, nslcd, httpd-admin start when installed
- check services start at boot
- check services start/stop when enabled/disabled
- check services stop when uninstalled
#7 Updated by Davide Principi over 7 years ago
- Status changed from MODIFIED to ON_QA
- % Done changed from 60 to 70
In nethserver-testing:nethserver-lib-1.3.2-6.0git1c52af52.ns6.noarch.rpmnethserver-lib-1.3.2-7.0git5fc049e2.ns6.noarch.rpm
nethserver-lib-1.3.2-8.0gitbbf81fe1.ns6.noarch.rpm
nethserver-directory-1.2.3-2.0gitd928addb.ns6.noarch.rpmnethserver-ntopng-1.0.1-1.0gitc7376f62.ns6.noarch.rpm
nethserver-ntopng-1.0.1-2.0git931ac602.ns6.noarch.rpm
nethserver-httpd-admin-1.0.6-12.0git547b73e8.ns6.noarch.rpm
nethserver-base-1.4.3-8.0git2dc30599.ns6.noarch.rpm
#8 Updated by Davide Principi over 7 years ago
- Status changed from ON_QA to TRIAGED
- % Done changed from 70 to 20
#9 Updated by Davide Principi over 7 years ago
- Status changed from TRIAGED to ON_DEV
- Assignee set to Davide Principi
- % Done changed from 20 to 30
#10 Updated by Davide Principi over 7 years ago
- Status changed from ON_DEV to MODIFIED
- Assignee deleted (
Davide Principi) - % Done changed from 30 to 60
Modified
Now runlevel-adjust
disables SysV scripts, if an Upstart job is defined. The previous patch in nethserver-lib|1c52af52 was incomplete.
#11 Updated by Davide Principi over 7 years ago
- Status changed from MODIFIED to ON_QA
- % Done changed from 60 to 70
In nethserver-testing:
nethserver-lib-1.3.2-8.0gitbbf81fe1.ns6.noarch.rpm
#12 Updated by Davide Principi over 7 years ago
- Assignee set to Davide Principi
#13 Updated by Davide Principi over 7 years ago
- Status changed from ON_QA to TRIAGED
- % Done changed from 70 to 20
#14 Updated by Davide Principi over 7 years ago
- Status changed from TRIAGED to ON_DEV
- % Done changed from 20 to 30
#15 Updated by Davide Principi over 7 years ago
- Status changed from ON_DEV to MODIFIED
- Assignee deleted (
Davide Principi) - % Done changed from 30 to 60
#16 Updated by Davide Principi over 7 years ago
- Status changed from MODIFIED to ON_QA
- % Done changed from 60 to 70
In nethserver-testing:
nethserver-directory-1.2.3-6.0gitab344e58.ns6.noarch.rpm
nethserver-samba-1.3.6-2.0gitb26684ff.ns6.noarch.rpm
#17 Updated by Giacomo Sanchietti over 7 years ago
- Assignee set to Giacomo Sanchietti
#18 Updated by Giacomo Sanchietti over 7 years ago
- Status changed from ON_QA to VERIFIED
- Assignee deleted (
Giacomo Sanchietti) - % Done changed from 70 to 90
- check services start at boot OK
- check services start/stop when enabled/disabled OK
- check services stop when uninstalled OK
- check slapd, nslcd installed OK
- check httpd-admin start when installed OK but see Note below
Note
When upgrading nethserver-httpd-admin package, the httpd-admin service is still running but the system doesn't know the service pid:
[root@test ~]# status httpd-admin httpd-admin start/running
In this state, the service can't be controlled using upstart. Here is a workaround to be added to upgrade notes:
kilall httpd-admin signal-event runlevel-adjust
Marking as VERIFIED.
#19 Updated by Davide Principi over 7 years ago
- Status changed from VERIFIED to CLOSED
- % Done changed from 90 to 100
In nethserver-updates:
nethserver-samba-1.4.0-1.ns6.noarch.rpm
nethserver-directory-1.3.0-1.ns6.noarch.rpm
nethserver-dnsmasq-1.1.0-1.ns6.noarch.rpm
nethserver-shorewall-1.0.3-1.ns6.noarch.rpm
nethserver-mail-server-1.5.0-1.ns6.noarch.rpm
nethserver-mail-filter-1.1.4-1.ns6.noarch.rpm
nethserver-nethgui-1.3.0-1.ns6.noarch.rpm
nethserver-base-1.5.0-1.ns6.noarch.rpm
nethserver-lib-1.4.0-1.ns6.noarch.rpm
nethserver-httpd-admin-1.1.0-1.ns6.noarch.rpm
nethserver-yum-1.2.0-1.ns6.noarch.rpm
nethserver-ntopng-1.1.0-1.ns6.noarch.rpm