From 46af01c82fbe028f27727fbcaed7e9f94c90a28b Mon Sep 17 00:00:00 2001 From: kubajj Date: Thu, 10 Jul 2025 06:52:05 +0000 Subject: [PATCH] Log efibootmgr output as part of the system logs Create a file efibootmgr with the verbose output of the efibootmgr command when collecting the system logs. This can be used for debugging of boot order. Change-Id: Ic957024d19bb01a45a3014dc2a5e4492d087e893 Signed-off-by: Jakub Jelinek --- ironic_python_agent/hardware.py | 1 + ironic_python_agent/tests/unit/test_hardware.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ironic_python_agent/hardware.py b/ironic_python_agent/hardware.py index 965c0fabf..5c5eda30d 100644 --- a/ironic_python_agent/hardware.py +++ b/ironic_python_agent/hardware.py @@ -3447,6 +3447,7 @@ class GenericHardwareManager(HardwareManager): commands = { 'df': ['df', '-a'], 'dmesg': ['dmesg'], + 'efibootmgr': ['efibootmgr', '-v'], 'iptables': ['iptables', '-L'], 'ip_addr': ['ip', 'addr'], 'lsblk': ['lsblk', '--all', diff --git a/ironic_python_agent/tests/unit/test_hardware.py b/ironic_python_agent/tests/unit/test_hardware.py index 6cb38bf6a..c66140185 100644 --- a/ironic_python_agent/tests/unit/test_hardware.py +++ b/ironic_python_agent/tests/unit/test_hardware.py @@ -6259,7 +6259,7 @@ class TestCollectSystemLogs(base.IronicAgentTest): @mock.patch.object(hardware, '_collect_udev', autospec=True) def test_collect_system_logs(self, mock_udev, mock_execute): commands = set() - expected = {'df', 'dmesg', 'iptables', 'ip', 'lsblk', + expected = {'df', 'dmesg', 'efibootmgr', 'iptables', 'ip', 'lsblk', 'lshw', 'cat', 'mount', 'multipath', 'parted', 'ps'} def fake_execute(cmd, *args, **kwargs):