Werk #16440: kube: ValueError: not enough values to unpack

Component Checks & agents
Title kube: ValueError: not enough values to unpack
Date Jul 12, 2024
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.4.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.3.0p11 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

This error affects users, which use the Kubernetes special agent, and have enabled the option Persistent Volume Claims. It is a regression, which was introduced in Checkmk version 2.3.0. Previously, the agent could crash with the following error.

  File "/omd/sites/cmksite/lib/python3/cmk/special_agents/utils_kubernetes/transform_any.py", line 39, in _parse_metric_sample_with_labels
    value_string, *_optional_timestamp = timestamped_value.strip().split()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected at least 1, got 0)

This error occured sporadically, if the agent was unable to contact the kubelet via the Kubernets API. The error is now reported via the Kubelet Service. This is the same behaviour as in Checkmk 2.2.0.

To the list of all Werks