Werk #15849: Filesystem checks: Avoid crash if device reports negative free space

Component Checks & agents
Title Filesystem checks: Avoid crash if device reports negative free space
Date May 19, 2023
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.3.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.2.0 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)
2.1.0p29 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)
2.0.0p37 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk MSP (CME)

A negative value for the free space is of course nonsense. However, if a device reported this, Checkmk might have crashed with

ValueError("Cannot render negative timespan")

when attempting to compute the time left until the filesystem is full. Now, we instead report a value of 0 seconds in this case, st. users receive informative notifications about the problem.

To the list of all Werks