Catch up on the latest product updates, best practices, and expert insights from the Checkmk Conference #12 – Watch the livestream recordings now

Werk #22163: Solaris: Fix agent update and pkgrm in single directory deployment

Component Agent bakery
Title Solaris: Fix agent update and pkgrm in single directory deployment
Date Sep 29, 2026
Level Trivial Change
Class Bug Fix
Compatibility Incompatible - Manual interaction might be required
Checkmk versions & editions
3.0.0b1
Not yet released
Checkmk Pro, Checkmk Ultimate, Checkmk Cloud, Checkmk Ultimate MT
2.5.0p16
Not yet released
Checkmk Pro, Checkmk Ultimate, Checkmk Cloud, Checkmk Ultimate MT

On Solaris hosts with single directory deployment, Checkmk 2.5 agents could not be updated or removed. This concerns agent packages baked with the ruleset Customize agent package (Linux). Two problems caused it.

The removal with pkgrm aborted with this message:

Found neither 'update-alternatives' nor 'alternatives' command. Aborting.
pkgrm: ERROR: preremove script did not complete successfully

The script behind this message makes the agent's executables available in /usr/bin. Solaris provides neither of the two commands. Up to Checkmk 2.5.0p5, the package scripts ignored the failure. Since Checkmk 2.5.0p6, the failure aborted the removal, and with it every automatic agent update. The script now creates plain symlinks if neither command exists, and it never aborts a package transaction. As a side effect, the agent's executables are now available in /usr/bin on Solaris, too.

The agent updater failed with this message:

Failed installing Checkmk agent: module 'os' has no attribute 'getresuid'.

This happened if a user named like the configured agent controller user existed on the host, by default cmk-agent. Solaris has no agent controller, but the agent updater still switched to that user and then failed to switch back to root. The agent updater now switches only if the agent controller is actually deployed.

Action required for affected hosts

An affected host keeps failing even after you update your site and bake the agents again. The reason is that pkgrm runs the removal script of the installed package, not the one of the new package. Install the new package once manually as root:

  1. Disable the failing script of the installed package. With the default installation directory, this is: echo 'exit 0' > /opt/checkmk/agent/default/package/scripts/manage-binaries.sh On Solaris, this script never created any symlinks, so there is nothing to clean up.
  2. Remove the installed package: pkgrm check-mk-agent
  3. Install the new package: pkgadd -d <package file> check-mk-agent

Afterwards, automatic agent updates work again. Hosts that still run a 2.4 agent aren't affected and update normally.

To the list of all Werks