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