From 04d822bc897c4060d5d8c54df5e0caae7bad36c8 Mon Sep 17 00:00:00 2001 From: BombermaG Date: Tue, 8 Sep 2026 14:19:19 +0200 Subject: [PATCH] fix(device): read the subsystem dict, not its keys subsystem_get() returns one subsystem dict, but the probe passed it to list.extend(), which appends the dict's keys. The first element was then the string 'nqn' instead of the dict, so listener and namespace were always reported missing, even on a healthy device. Self-repair uses this probe twice: once to decide what to rebuild, once to check the result. It rebuilt nothing, called itself failed, and spent an attempt on every run. After five attempts the device is marked retries_exhausted and gets no more automatic repair. --- simplyblock_core/controllers/device_controller.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/simplyblock_core/controllers/device_controller.py b/simplyblock_core/controllers/device_controller.py index d9e2924dc8..454b7057f5 100644 --- a/simplyblock_core/controllers/device_controller.py +++ b/simplyblock_core/controllers/device_controller.py @@ -450,7 +450,13 @@ def _safe(label, fn): subsys: list = [] def _get_subsys(): - subsys.extend(rpc_client.subsystem_get(device_obj.nvmf_nqn) or []) + # subsystem_get() returns one subsystem dict, or None. + # list.extend(dict) would append the dict's keys instead of the dict. + entry = rpc_client.subsystem_get(device_obj.nvmf_nqn) + if isinstance(entry, dict): + subsys.append(entry) + elif entry: + subsys.extend(entry) return subsys _safe("subsystem", _get_subsys)