Skip to content

Commit aad9e52

Browse files
committed
22141 FIX nimble_volumes: Fix crash on volumes without monitoring data
Jira: CMK-37374 Crash-Group-ID: 4842 Latent-Since: I117714255a44857304c78a59e5c5fa5e042c8549 Change-Id: Ib4e361eef82c98376a4e9caf251d5e76319b08b7
1 parent e372a39 commit aad9e52

4 files changed

Lines changed: 26 additions & 5 deletions

File tree

.werks/22141.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[//]: # (werk v3)
2+
# nimble_volumes: Fix crash on volumes without monitoring data
3+
4+
key | value
5+
---------- | ---
6+
date | 2026-08-07T09:04:47.621844+00:00
7+
version | 2.5.0p12
8+
class | fix
9+
edition | community
10+
component | checks
11+
level | 1
12+
compatible | yes
13+
14+
On some Nimble Storage arrays, the _Volume_ services crashed with
15+
16+
```
17+
ValueError: invalid literal for int() with base 10: ''
18+
```
19+
20+
Such arrays list volumes in their SNMP walk that carry no monitoring data at all.
21+
These volumes are now ignored.
22+
They are no longer discovered, and services that already exist for them will go stale.

cmk/base/legacy_checks/nimble_volumes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ def _check_nimble_volumes(item, params, info, now):
3939

4040

4141
def parse_nimble_volumes(string_table: StringTable) -> StringTable:
42-
return string_table
42+
# Some entries don't contain any monitoring data: CMK-37374
43+
return [line for line in string_table if line[2] and line[3] and line[4]]
4344

4445

4546
check_info["nimble_volumes"] = LegacyCheckDefinition(

cmk/plugins/collection/checkman/nimble_volumes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ item:
1212
Name of the volume
1313

1414
discovery:
15-
One service is created for each volume.
15+
One service is created for each volume. Volumes whose SNMP walk contains no
16+
size, usage or online data are ignored.

tests/unit/cmk/base/legacy_checks/test_nimble_volumes.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
# mypy: disable-error-code="no-untyped-call"
77

8-
import pytest
9-
108
from cmk.base.legacy_checks.nimble_volumes import (
119
_check_nimble_volumes,
1210
inventory_nimble_volumes,
@@ -38,7 +36,6 @@ def test_check_ok_volume() -> None:
3836
assert ("fs_size", 1073741824, None, None, 0, None) in perfdata
3937

4038

41-
@pytest.mark.xfail(strict=True, reason="CMK-37374")
4239
def test_check_does_not_crash_on_empty_size_values() -> None:
4340
section = parse_nimble_volumes(STRING_TABLE)
4441
assert not list(

0 commit comments

Comments
 (0)