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

akosiaris updated the task description. (Show Details)

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

Fixed!

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