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

Komponente Checks & agents
Titel kube: ValueError: not enough values to unpack
Datum 12.07.2024
Level Kleine Änderung
Klasse Bugfix
Kompatibilität Kompatibel - benötigt kein manuelles Eingreifen
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.

Zur Liste aller Werks