Page MenuHomePhabricator

puppetdb does not start up on reboot
Closed, ResolvedPublic

Description

I rebooted puppetdb1001 for T181121 only to end up finding puppetdb.service in the following state

$ sudo systemctl status puppetdb.service 
* puppetdb.service - puppetdb Service
Loaded: loaded (/lib/systemd/system/puppetdb.service; disabled; vendor preset: enabled)
Active: inactive (dead)

This is clearly something that should not happen and the service should be started automatically on reboot. I am not sure why, my guess is 4a55db4dc390532f796c08a947dd1d73ac53caaa, line 167, but I 'd like some input.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 19 2018, 9:49 AM
akosiaris triaged this task as High priority.Apr 19 2018, 9:49 AM
akosiaris updated the task description. (Show Details)
akosiaris updated the task description. (Show Details)Apr 19 2018, 10:07 AM
herron claimed this task.Apr 19 2018, 4:43 PM

That's odd, will spin up a test instance and attempt to reproduce

Change 427772 had a related patch set uploaded (by Herron; owner: Herron):
[operations/puppet@production] puppetdb: add service enable => true

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

Sure enough, it's reproducible.

Looks like the systemd::service entry used previously automatically set enable => true when called with ensure => present which explains the difference on the new hosts.

$enable = $ensure ? {
    'present' => true,
    default   => false,
}

Adding a simple enable => true on the puppetdb service fixes this on the testing instance.

Change 427772 merged by Herron:
[operations/puppet@production] puppetdb: add service enable => true

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

herron closed this task as Resolved.Apr 19 2018, 9:44 PM

Fixed!

Notice: /Stage[main]/Puppetdb::App/Service[puppetdb]/enable: enable changed 'false' to 'true'
UNIT FILE                                                                 STATE
puppetdb.service                                                          enabled