summaryrefslogtreecommitdiff
path: root/ironic_python_agent/utils.py
diff options
context:
space:
mode:
authorDmitry Tantsur <dtantsur@protonmail.com>2019-10-08 17:30:05 +0200
committerDmitry Tantsur <dtantsur@protonmail.com>2019-10-14 15:28:08 +0200
commit11976c9d2bda8d305a77305c5e4dbf3658a3f16d (patch)
treedf83c2be6e9177846c31525f72900a366a672b28 /ironic_python_agent/utils.py
parent5e3153825a96f3cd45d2657dd3e96b4722eddd61 (diff)
downloadironic-python-agent-11976c9d2bda8d305a77305c5e4dbf3658a3f16d.tar.gz
Collect lsblk and /proc/mdstat with ramdisk logs
This should improve debugability of partitioning problems. Change-Id: I3c7ae3f2831c9900a3f0d24daec6dd6b8bea6a60
Diffstat (limited to 'ironic_python_agent/utils.py')
-rw-r--r--ironic_python_agent/utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ironic_python_agent/utils.py b/ironic_python_agent/utils.py
index 0257cfb1..58cce209 100644
--- a/ironic_python_agent/utils.py
+++ b/ironic_python_agent/utils.py
@@ -52,12 +52,17 @@ LOG = logging.getLogger(__name__)
AGENT_PARAMS_CACHED = dict()
+LSBLK_COLUMNS = ['KNAME', 'MODEL', 'SIZE', 'ROTA', 'TYPE', 'UUID', 'PARTUUID']
+
+
COLLECT_LOGS_COMMANDS = {
'ps': ['ps', 'au'],
'df': ['df', '-a'],
'iptables': ['iptables', '-L'],
'ip_addr': ['ip', 'addr'],
'lshw': ['lshw', '-quiet', '-json'],
+ 'lsblk': ['lsblk', '--all', '-o%s' % ','.join(LSBLK_COLUMNS)],
+ 'mdstat': ['cat', '/proc/mdstat'],
}
@@ -404,6 +409,7 @@ def collect_system_logs(journald_max_lines=None):
the journald. if None, return everything.
:returns: A tar, gzip base64 encoded string with the logs.
"""
+ LOG.info('Collecting system logs and debugging information')
def try_get_command_output(io_dict, file_name, command):
try: