Werk #14828: Docker agent plugin: Handle race conditions caused by removed containers

Component Checks & agents
Title Docker agent plugin: Handle race conditions caused by removed containers
Date Nov 14, 2022
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.2.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.1.0p17 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)
2.0.0p31 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)

As of this werk, the docker agent plugin handles the following two race conditions:

  • Removal of a container exactly at the time when the agent plugin attempts to query container statistics (CPU usage etc.). Before this werk, depending on the docker version, the plugin crashed with either requests.exceptions.JSONDecodeError or json.decoder.JSONDecodeError.
  • For old docker versions only (eg. 1.31): Removal of a container in between querying the list of containers on the target system and subsequently querying the individual containers. For newer docker versions, the agent plugin already handled this race condition before this werk.

Note that users have to update the agent plugin on affected systems in order to benefit from this werk.

To the list of all Werks