summaryrefslogtreecommitdiff
path: root/ironic_python_agent/utils.py
diff options
context:
space:
mode:
authorRozzii <adam.rozman@est.tech>2022-08-16 11:11:16 +0300
committerrozzix <adam.rozman@est.tech>2022-10-10 19:31:47 +0300
commit830fdfa4c6ec62fdd1f1ec761c6f92b0f218d252 (patch)
tree3ba170205e495cacdc5ae808d9a264d32b098469 /ironic_python_agent/utils.py
parent43748af791cb649e89f937e894c2214e36468c8f (diff)
downloadironic-python-agent-830fdfa4c6ec62fdd1f1ec761c6f92b0f218d252.tar.gz
prioritize lsblk as a source of device serials
The current way of prioritizing ID/DM_SERIAL_SHORT or ID/DM_SERIAL works in most cases but the udev values seem to be unreliable. Based on experience it looks like lsblk might be a better source of truth than udev in regerards to serial number information. This commit makes lsblk the default provider of block device serial number information. Story: 2010263 Task: 46161 Change-Id: I16039b46676f1a61b32ee7ca7e6d526e65829113
Diffstat (limited to 'ironic_python_agent/utils.py')
-rw-r--r--ironic_python_agent/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ironic_python_agent/utils.py b/ironic_python_agent/utils.py
index 0da737a8..41daaf97 100644
--- a/ironic_python_agent/utils.py
+++ b/ironic_python_agent/utils.py
@@ -59,7 +59,8 @@ CONF = cfg.CONF
AGENT_PARAMS_CACHED = dict()
-LSBLK_COLUMNS = ['KNAME', 'MODEL', 'SIZE', 'ROTA', 'TYPE', 'UUID', 'PARTUUID']
+LSBLK_COLUMNS = ['KNAME', 'MODEL', 'SIZE', 'ROTA',
+ 'TYPE', 'UUID', 'PARTUUID', 'SERIAL']
COLLECT_LOGS_COMMANDS = {