Page MenuHomePhabricator

Make services manageable by systemd
Closed, ResolvedPublic

Description

We have several services relying on Ubuntu upstart which should be manageable via systemd so we can eventually migrate them to Debian/Jessie.

This is a tracking bug for the upstart -> systemd migration.

Notes:

@MoritzMuehlenhoff has done an initial work for T95055: Convert ircecho init script to a systemd unit

From T95003 @Joe pointed to our puppet define base::service_unit which maybe a good template to add systemd to nodepool: https://github.com/wikimedia/operations-puppet/blob/21c72942dd7bf25dbe0759d2f867082e966bfb45/modules/base/manifests/service_unit.pp

An example for nodepool running in interactive mode: https://gerrit.wikimedia.org/r/224102

Event Timeline

hashar created this task.Apr 28 2015, 11:08 AM
hashar raised the priority of this task from to Needs Triage.
hashar updated the task description. (Show Details)
hashar added a project: acl*sre-team.
hashar added a subscriber: hashar.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 28 2015, 11:08 AM

+ @MoritzMuehlenhoff from ops who have experience with systemd!

Also note that there is base::service_unit define in ops/puppet which lets you pick the init script based on the current distro, which could ease transition.

hashar updated the task description. (Show Details)Apr 28 2015, 11:52 AM
hashar set Security to None.
hashar added a subscriber: Joe.
Dzahn triaged this task as Normal priority.Apr 29 2015, 1:43 AM
Dzahn added a subscriber: Dzahn.
Restricted Application added a subscriber: Matanya. · View Herald TranscriptJul 22 2015, 2:59 PM
hashar updated the task description. (Show Details)Jul 22 2015, 3:00 PM
elukey added a subscriber: elukey.Mar 4 2016, 11:54 AM
hashar removed a subscriber: hashar.Mar 7 2016, 2:04 PM

one takeaway from T124197: Port Ganglia aggregator setup to systemd is how to handle multiple instances of the same service, like ganglia aggregator. Using systemd instances seems to work well via base::service_unit, one other thing it would be nice to have for operator comfort is being able to manipulate all instances at once when e.g. puppet is disabled.

one way I think to achieve this is to provide a dummy service e.g. SERVICE-instances only for dependency management purposes

[Unit]
Description=SERVICE-instances

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/bin/true

and in turn the templated instance unit file would be PartOf=SERVICE-instances and WantedBy=SERVICE-instances. Note that the SERVICE-instances won't be started at boot, it is there just as a convenience as each instance is already ensure=>running and enabled to start at boot by puppet

Phabricator_maintenance renamed this task from Make services manageable by systemd (tracking) to Make services manageable by systemd.Aug 14 2016, 12:15 AM
hashar closed this task as Resolved.Nov 28 2016, 2:13 PM
hashar claimed this task.

Most services have or are being migrated to Jessie and they are ported to systemd/base::service_unit in the process. I dont think this task services any purpose, I filled it so we could eventually ask questions.