Page MenuHomePhabricator

Deprecate `base::service_unit` in puppet
Open, MediumPublic

Description

base::service_unit was a handy bridge abstraction during the migration from upstart to systemd. Given that's mostly over now, let's deprecate and progressively remove it from puppet, as we have better resources to manage systemd units in systemd::service and systemd::unit

Steps:

  • Add a deprecation warning to base::service_unit whenever it's used without an upstart or sysvinit parameter
  • Add a wmfstyleguide violation for use of base::service_unit, so that any new declaration will trigger a -1 from CI
  • Convert all the systemd-only base::service_unit to use systemd::service or systemd::unit
  • Check and remove unused upstart scripts/declaration and convert the corresponding units

Once we got rid of trusty

  • Convert the remaining declarations
  • Remove base::service_unit from puppet
  • Remove the wmf styleguide check

progress meter: https://gerrit.wikimedia.org/r/q/topic:%22base_service_unit%22+(status:open%20OR%20status:merged)

Details

SubjectRepoBranchLines +/-
operations/puppetproduction+3 -3
operations/puppetproduction+5 -5
operations/puppetproduction+5 -3
operations/puppetproduction+8 -84
operations/puppetproduction+1 -4
operations/puppetproduction+0 -218
operations/puppetproduction+5 -18
operations/puppetproduction+3 -7
operations/puppetproduction+2 -2
operations/puppetproduction+2 -20
operations/puppetproduction+3 -23
operations/puppetproduction+3 -3
operations/puppetproduction+2 -16
operations/puppetproduction+2 -2
operations/puppetproduction+2 -3
operations/puppetproduction+3 -3
operations/puppetproduction+1 -1
operations/puppetproduction+5 -6
operations/puppetproduction+3 -2
operations/puppetproduction+4 -4
operations/puppetproduction+5 -6
operations/puppetproduction+4 -16
operations/puppetproduction+5 -8
operations/puppetproduction+0 -13
operations/puppetproduction+0 -141
operations/puppetproduction+6 -4
operations/puppetproduction+6 -6
operations/puppetproduction+3 -4
operations/puppetproduction+2 -3
operations/puppetproduction+3 -3
operations/puppet-lint/wmf_styleguide-checkmaster+83 -2
operations/puppetproduction+5 -5
operations/puppetproduction+6 -43
operations/puppetproduction+4 -8
operations/puppetproduction+0 -44
operations/puppetproduction+2 -0
operations/puppetproduction+2 -20
operations/puppetproduction+2 -3
operations/puppetproduction+1 -1
operations/puppetproduction+2 -16
operations/puppetproduction+2 -18
operations/puppetproduction+2 -3
operations/puppetproduction+6 -9
Show related patches Customize query in gerrit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 434538 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] jenkins: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/434538

Change 434539 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] sentry: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/434539

Change 434542 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] dumps/snapshot: add 'restart => true' to systemd::service

https://gerrit.wikimedia.org/r/434542

Change 434542 merged by Dzahn:
[operations/puppet@production] dumps/snapshot: add 'restart => true' to systemd::service

https://gerrit.wikimedia.org/r/434542

Change 434537 merged by Alexandros Kosiaris:
[operations/puppet@production] k8s: remove trusty/upstart support

https://gerrit.wikimedia.org/r/434537

Change 433491 merged by Alexandros Kosiaris:
[operations/puppet@production] otrs: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/433491

Change 434535 merged by Alexandros Kosiaris:
[operations/puppet@production] keyholder: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/434535

Change 433101 merged by Arturo Borrero Gonzalez:
[operations/puppet@production] profile::docker::flannel: Use systemd::service

https://gerrit.wikimedia.org/r/433101

Change 433162 merged by Giuseppe Lavagetto:
[operations/puppet-lint/wmf_styleguide-check@master] Add the capability to check for deprecated defines

https://gerrit.wikimedia.org/r/433162

Vvjjkkii renamed this task from Deprecate `base::service_unit` in puppet to bycaaaaaaa.Jul 1 2018, 1:09 AM
Vvjjkkii raised the priority of this task from Medium to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.

Change 434539 merged by Dzahn:
[operations/puppet@production] sentry: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/434539

Change 448770 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] ircecho: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/448770

Change 448778 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] mediawiki::cgroup: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/448778

Change 448779 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] graphite::carbon_c_relay: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/448779

Change 448788 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] xdummy: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/448788

Change 434538 merged by Dzahn:
[operations/puppet@production] jenkins: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/434538

Change 448788 merged by Dzahn:
[operations/puppet@production] xdummy: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/448788

Change 448779 merged by Dzahn:
[operations/puppet@production] graphite::carbon_c_relay: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/448779

Change 434427 merged by Dzahn:
[operations/puppet@production] zuul: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/434427

Change 456312 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] systemd::sidekick: replace base_service::unit comment with systemd::service

https://gerrit.wikimedia.org/r/456312

Change 456316 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] apertium: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/456316

Change 456317 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] confd: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/456317

Change 456319 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] hhvm: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/456319

Change 458618 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] confd: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/458618

Change 458618 abandoned by Dzahn:
confd: base::service_unit -> systemd::service

Reason:
duplicate of https://gerrit.wikimedia.org/r/#/c/operations/puppet/ /456317/

https://gerrit.wikimedia.org/r/458618

@Joe Do we (still) need systemd::sidekick ? I have https://gerrit.wikimedia.org/r/#/c/operations/puppet/+/456312/ to replace base:service_unit references in it but i also see that it's not used anywhere.. So wanted to ask before i worry more about how to fix the dependency inside it.

@Dzahn yup it's unused and useless as things stand, we should remove it.

Change 456312 merged by Dzahn:
[operations/puppet@production] delete systemd::sidekick

https://gerrit.wikimedia.org/r/456312

Change 482116 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] librenms: delete unused upstart initscript

https://gerrit.wikimedia.org/r/482116

Change 482116 merged by Dzahn:
[operations/puppet@production] librenms: delete unused upstart initscript

https://gerrit.wikimedia.org/r/482116

Change 482118 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] k8s::flannel: remove upstart, use systemd::service instead

https://gerrit.wikimedia.org/r/482118

Change 448770 abandoned by Dzahn:
ircecho: base::service_unit -> systemd::service

Reason:
shinken

https://gerrit.wikimedia.org/r/448770

Change 482118 abandoned by Dzahn:
k8s::flannel: remove upstart, use systemd::service instead

Reason:
no reviewers

https://gerrit.wikimedia.org/r/482118

Change 482118 restored by Alexandros Kosiaris:
k8s::flannel: remove upstart, use systemd::service instead

Reason:
There's a 1 and a 2 already, there are reviewers, it's just blocked pending the removal of the old cluster

https://gerrit.wikimedia.org/r/482118

Change 456317 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] confd: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/456317

Change 482118 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] k8s::flannel: remove upstart, use systemd::service instead

https://gerrit.wikimedia.org/r/482118

Change 482118 merged by Dzahn:
[operations/puppet@production] k8s::flannel: remove upstart, use systemd::service instead

https://gerrit.wikimedia.org/r/482118

Change 499993 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] xvfb: replace base::service_unit with systemd::service

https://gerrit.wikimedia.org/r/499993

Change 499993 merged by Dzahn:
[operations/puppet@production] xvfb: replace base::service_unit with systemd::service

https://gerrit.wikimedia.org/r/499993

Change 456316 merged by Dzahn:
[operations/puppet@production] apertium: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/456316

Change 456317 merged by Dzahn:
[operations/puppet@production] confd: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/456317

I switched confd and it seemed to be just fine on all tested hosts.. except.. it wasn't on mc* hosts because of this puppet relationship issue:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Could not find resource 'Base::Service_unit[confd]' for relationship on 'Base::Service_unit[redis-instance-tcp_6379]' on node mc1021.eqiad.wmnet

that's why that is reverted again for now.

Checking the box for adding a style guide violation. That is already happening; as i could confirm when my revert above got downvoted for just that.

Change 503097 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] confd/redis::multidc: switch to systemd::service

https://gerrit.wikimedia.org/r/503097

Change 503108 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] confluence::kafka::broker: update outdated comment on base::service_unit

https://gerrit.wikimedia.org/r/503108

Change 503108 merged by Dzahn:
[operations/puppet@production] confluence::kafka::broker: update outdated comment on base::service_unit

https://gerrit.wikimedia.org/r/503108

Change 503116 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] toollabs::kube2proxy: switch to systemd::service

https://gerrit.wikimedia.org/r/503116

Change 503117 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] toollabs::maintain_kubeusers: switch to systemd::service

https://gerrit.wikimedia.org/r/503117

Change 503119 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] toollabs::proxy: switch to systemd::service, delete upstart template

https://gerrit.wikimedia.org/r/503119

Change 503116 merged by Dzahn:
[operations/puppet@production] toollabs::kube2proxy: switch to systemd::service

https://gerrit.wikimedia.org/r/503116

Change 503119 merged by Dzahn:
[operations/puppet@production] toollabs::proxy: switch to systemd::service, delete upstart template

https://gerrit.wikimedia.org/r/503119

Change 503117 merged by Dzahn:
[operations/puppet@production] toollabs::maintain_kubeusers: switch to systemd::service

https://gerrit.wikimedia.org/r/503117

Change 506331 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] labstore::fileserver::exports: convert to systemd service

https://gerrit.wikimedia.org/r/506331

Change 506557 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] kafkatee: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/506557

Change 506558 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] mariadb-eventlogging-repl: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/506558

Change 506559 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] memcached: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/506559

Change 506331 merged by Bstorm:
[operations/puppet@production] labstore::fileserver::exports: convert to systemd service

https://gerrit.wikimedia.org/r/506331

Change 506557 merged by Dzahn:
[operations/puppet@production] kafkatee: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/506557

Change 508009 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] vagrant::mediawiki: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/508009

Change 456319 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] hhvm: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/456319

Change 511600 had a related patch set uploaded (by Effie Mouzeli; owner: Effie Mouzeli):
[operations/puppet@production] memcached: replace service_unit with systemd

https://gerrit.wikimedia.org/r/511600

Change 511600 abandoned by Effie Mouzeli:
memcached: replace service_unit with systemd

Reason:
506559

https://gerrit.wikimedia.org/r/511600

Change 506559 merged by Dzahn:
[operations/puppet@production] memcached: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/506559

Change 508009 merged by Dzahn:
[operations/puppet@production] vagrant::mediawiki: base::service_unit -> systemd::service

https://gerrit.wikimedia.org/r/508009

Change 511791 had a related patch set uploaded (by Dzahn; owner: Dzahn):
[operations/puppet@production] delete the cgred module

https://gerrit.wikimedia.org/r/511791

Change 511791 merged by Dzahn:
[operations/puppet@production] delete the cgred module

https://gerrit.wikimedia.org/r/511791

Change 520773 had a related patch set uploaded (by Muehlenhoff; owner: Muehlenhoff):
[operations/puppet@production] prometheus-snmp-exporter: Switch to systemd::service

https://gerrit.wikimedia.org/r/520773

Change 520773 merged by Muehlenhoff:
[operations/puppet@production] prometheus-snmp-exporter: Switch to systemd::service

https://gerrit.wikimedia.org/r/520773

Change 456319 abandoned by Dzahn:
hhvm: base::service_unit -> systemd::service

Reason:
no more hhvm

https://gerrit.wikimedia.org/r/456319

modules still using base::service_unit:

  • confd
  • varnishkafka
  • mediawiki (cgroups)
  • udp2log
  • uwsgi
  • redis
  • service
  • (base) (base::service_unit)
  • hhvm
  • prometheus snmp/node exporterr
  • nrpe (nagios)

Change 506558 abandoned by Dzahn:
mariadb-eventlogging-repl: base::service_unit -> systemd::service

Reason:
this file does not exist anymore meanwhile, also never got reviews

https://gerrit.wikimedia.org/r/506558

Change 503097 abandoned by Dzahn:
[operations/puppet@production] confd/redis::multidc: switch to systemd::service

Reason:
giving up, it's been over a year

https://gerrit.wikimedia.org/r/503097

Change 448778 abandoned by Dzahn:
[operations/puppet@production] mediawiki::cgroup: base::service_unit -> systemd::service

Reason:
giving up, it's been since 2018

https://gerrit.wikimedia.org/r/448778