Merge "Collect a full lsblk output in the ramdisk logs"

This commit is contained in:
Zuul 2022-05-09 14:21:43 +00:00 committed by Gerrit Code Review
commit 6b8f387498
3 changed files with 10 additions and 16 deletions

View File

@ -429,10 +429,7 @@ class TestUtils(ironic_agent_base.IronicAgentTest):
mock_outputs.assert_has_calls(calls, any_order=True)
mock_gzip_b64.assert_called_once_with(
file_list=[],
io_dict={'journal': mock.ANY, 'ip_addr': mock.ANY, 'ps': mock.ANY,
'df': mock.ANY, 'iptables': mock.ANY, 'lshw': mock.ANY,
'lsblk': mock.ANY, 'mdstat': mock.ANY,
'mount': mock.ANY, 'parted': mock.ANY})
io_dict=mock.ANY)
@mock.patch.object(utils, 'gzip_and_b64encode', autospec=True)
@mock.patch.object(utils, 'is_journalctl_present', autospec=True)
@ -457,10 +454,7 @@ class TestUtils(ironic_agent_base.IronicAgentTest):
mock_outputs.assert_has_calls(calls, any_order=True)
mock_gzip_b64.assert_called_once_with(
file_list=[tmp.name],
io_dict={'journal': mock.ANY, 'ip_addr': mock.ANY, 'ps': mock.ANY,
'df': mock.ANY, 'iptables': mock.ANY, 'lshw': mock.ANY,
'lsblk': mock.ANY, 'mdstat': mock.ANY,
'mount': mock.ANY, 'parted': mock.ANY})
io_dict=mock.ANY)
@mock.patch.object(utils, 'gzip_and_b64encode', autospec=True)
@mock.patch.object(utils, 'is_journalctl_present', autospec=True)
@ -480,10 +474,7 @@ class TestUtils(ironic_agent_base.IronicAgentTest):
mock_outputs.assert_has_calls(calls, any_order=True)
mock_gzip_b64.assert_called_once_with(
file_list=['/var/log'],
io_dict={'iptables': mock.ANY, 'ip_addr': mock.ANY, 'ps': mock.ANY,
'dmesg': mock.ANY, 'df': mock.ANY, 'lshw': mock.ANY,
'lsblk': mock.ANY, 'mdstat': mock.ANY,
'mount': mock.ANY, 'parted': mock.ANY})
io_dict=mock.ANY)
@mock.patch.object(utils, 'gzip_and_b64encode', autospec=True)
@mock.patch.object(utils, 'is_journalctl_present', autospec=True)
@ -507,10 +498,7 @@ class TestUtils(ironic_agent_base.IronicAgentTest):
mock_outputs.assert_has_calls(calls, any_order=True)
mock_gzip_b64.assert_called_once_with(
file_list=['/var/log', tmp.name],
io_dict={'iptables': mock.ANY, 'ip_addr': mock.ANY, 'ps': mock.ANY,
'dmesg': mock.ANY, 'df': mock.ANY, 'lshw': mock.ANY,
'lsblk': mock.ANY, 'mdstat': mock.ANY,
'mount': mock.ANY, 'parted': mock.ANY})
io_dict=mock.ANY)
def test_get_ssl_client_options(self):
# defaults

View File

@ -68,6 +68,7 @@ COLLECT_LOGS_COMMANDS = {
'ip_addr': ['ip', 'addr'],
'lshw': ['lshw', '-quiet', '-json'],
'lsblk': ['lsblk', '--all', '-o%s' % ','.join(LSBLK_COLUMNS)],
'lsblk-full': ['lsblk', '--all', '--bytes', '--output-all', '--pairs'],
'mdstat': ['cat', '/proc/mdstat'],
'mount': ['mount'],
'parted': ['parted', '-l'],

View File

@ -0,0 +1,5 @@
---
other:
- |
The ramdisk logs now contain an ``lsblk`` output with all pairs in the new
``lsblk-full`` file.