From e6a4c8acc51dea2d161bb138e64ec134b3f1fb2c Mon Sep 17 00:00:00 2001 From: Guillaume Date: Tue, 19 Dec 2023 15:40:27 +0100 Subject: [PATCH] Don't check return status from smartctl -a Some device doesn't support SMART capability and getting information from such device returns an error code 4. As it happens in CI we remove the check of the return code. Signed-off-by: Guillaume --- SOURCES/etc/xapi.d/plugins/smartctl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SOURCES/etc/xapi.d/plugins/smartctl.py b/SOURCES/etc/xapi.d/plugins/smartctl.py index 6958ac0..053f223 100755 --- a/SOURCES/etc/xapi.d/plugins/smartctl.py +++ b/SOURCES/etc/xapi.d/plugins/smartctl.py @@ -24,7 +24,7 @@ def get_information(session, args): with OperationLocker(): disks = _list_disks() for disk in disks: - cmd = run_command(["smartctl", "-j", "-a", disk]) + cmd = run_command(["smartctl", "-j", "-a", disk], check=False) results[disk] = json.loads(cmd['stdout']) return json.dumps(results)