summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2022-06-24 16:47:18 +0100
committerMark Goddard <mark@stackhpc.com>2022-12-12 15:07:20 +0000
commit3e2fef82468ceb3c2f1dd345acf4659d68cdd040 (patch)
tree32bae8d680912d8cfd380f54d83ff3cf3fd2309d
parent6204c13d96dc77388625b403af9b3a45dd5a146f (diff)
downloadironic-python-agent-3e2fef82468ceb3c2f1dd345acf4659d68cdd040.tar.gz
Warn when smartctl not found
Currently, if smartctl is not found by IPA, it will silently skip ATA secure erase and proceed to shred (if enabled). This is supposedly for backwards compatibility, but is quite hard to diagnose. This change adds a warning message to make it more obvious what is happening. TrivialFix Change-Id: I03a381e99de79f201ec7e9a388777c3d48457e93 (cherry picked from commit b68fa6b2e13774dbde5d0b81f6bf0b0095536aa4)
-rw-r--r--ironic_python_agent/hardware.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ironic_python_agent/hardware.py b/ironic_python_agent/hardware.py
index c87a7202..37af75fc 100644
--- a/ironic_python_agent/hardware.py
+++ b/ironic_python_agent/hardware.py
@@ -1748,10 +1748,11 @@ class GenericHardwareManager(HardwareManager):
'ATA commands via the `smartctl` utility with device '
'%s do not succeed.', block_device.name)
return False
- except OSError:
+ except OSError as e:
# Processutils can raise OSError if a path is not found,
# and it is okay that we tollerate that since it was the
# prior behavior.
+ LOG.warning('Unable to execute `smartctl` utility: %s', e)
return True
def _ata_erase(self, block_device):