Werk #14738: Linux agent: agent controller not in path when installing to non-default location

Component Agent bakery
Title Linux agent: agent controller not in path when installing to non-default location
Date Sep 7, 2022
Checkmk Editon Checkmk Enterprise (CEE)
Checkmk Version 2.2.0i1 2.1.0p12
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed

With the ruleset "Installation paths for agent files", you can choose non-default installation directories for the Checkmk agent, including the path for executables.

While the chosen executable path should be in the PATH environment variable of target systems, this is not guaranteed. Previously, if it failed to be in the PATH within the context of the agent installation/update with dpkg or rpm, the installation scripts failed to find the command cmk-agent-ctl, which resulted in an inconsistent agent setup.

This situation is now fixed by executing the agent controller by its full (custom) path on agent installation/update.

Please note that the affected script /var/lib/cmk-agent/super-server/setup deploy won't be able to find the custom executable directory when called manually, so it will fall back to /usr/bin/cmk-agent-ctl or just cmk-agent-ctl.

To the list of all Werks