summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2021-09-03 13:20:11 +0000
committerGerrit Code Review <review@openstack.org>2021-09-03 13:20:11 +0000
commit2acdf3cd17f5fc87b1c8fde4a01b5857213e6643 (patch)
treec06dc11579a6f9daea45eb7820e13178d9e21b81
parent667e83da0e1e90ca49b14607af0faccb4b791fd4 (diff)
parent07ff3b8bbc8c043ba1469aba1147bba81f8997ee (diff)
downloadironic-python-agent-2acdf3cd17f5fc87b1c8fde4a01b5857213e6643.tar.gz
Merge "Trivial: better debugging in list_all_block_devices"
-rw-r--r--ironic_python_agent/hardware.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ironic_python_agent/hardware.py b/ironic_python_agent/hardware.py
index e963059f..fb743744 100644
--- a/ironic_python_agent/hardware.py
+++ b/ironic_python_agent/hardware.py
@@ -447,7 +447,7 @@ def list_all_block_devices(block_type='disk',
# media, however USB devices are also flagged as removable media.
# we have to explicitly do this as floppy disks are type disk.
if ignore_floppy and str(device.get('KNAME')).startswith('fd'):
- LOG.debug('Ignoring floppy disk device %s', device)
+ LOG.debug('Ignoring floppy disk device: %s', line)
continue
# Search for raid in the reply type, as RAID is a
@@ -456,7 +456,10 @@ def list_all_block_devices(block_type='disk',
# lvm, part, rom, loop
if devtype != block_type:
if devtype is None or ignore_raid:
- LOG.debug("Skipping: %s", line)
+ LOG.debug(
+ "TYPE did not match. Wanted: %(block_type)s but found: "
+ "%(line)s (RAID devices are ignored)",
+ {'block_type': block_type, 'line': line})
continue
elif ('raid' in devtype
and block_type in ['raid', 'disk']):