Skip to content

sysstat timers do not start on boot on Debian/Ubuntu with systemd #17

@gignaWedi

Description

@gignaWedi

On Debian 11+ and Ubuntu 22.04+ systems where Puppet is not run at startup, sysstat-collect.timer and sysstat-summary.timer do not start automatically on boot even when the module is active and the timers were correctly started during the last Puppet run.

The Debian-specific block in init.pp unconditionally disables the legacy sysstat init service:

if $facts['os']['family'] == 'Debian' {
  service { 'sysstat':
    ensure => false,
    enable => false,
  }
  ...
}

On modern Debian/Ubuntu releases using the systemd path, the sysstat package installs sysstat-collect.timer and sysstat-summary.timer with WantedBy=sysstat.service in their [Install] sections. When sysstat.service is disabled by Puppet, that wants directory is not honored at boot and the timers never start, regardless of their own enabled state.

Steps to reproduce

  • Apply the module on Ubuntu 22.04+ or Debian 11+ with default settings ($disable not set to 'yes')
  • Reboot the system without running Puppet at startup
  • Check timer status: systemctl status sysstat-collect.timer

Expected behaviour

sysstat-collect.timer and sysstat-summary.timer are active after reboot.

Actual behaviour

Both timers are inactive. systemctl status sysstat-collect.timer shows the unit as disabled or dead.

Environment

OS: Ubuntu 22.04+ / Debian 11+
Puppet does not run at boot

Proposed fix

Change enable on the sysstat service resource to follow $svc_collect_ensure rather than being hardcoded to false. ensure => false should be retained; the legacy init service process should never run as the systemd timers fully replace it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions