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 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 subscribed.

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 set Security to None.
hashar added a subscriber: Joe.
Dzahn triaged this task as Medium priority.Apr 29 2015, 1:43 AM
Dzahn subscribed.

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 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.