Skip to content

Commit 3e2fef8

Browse files
committed
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 b68fa6b)
1 parent 6204c13 commit 3e2fef8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ironic_python_agent/hardware.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1748,10 +1748,11 @@ def _smartctl_security_check(self, block_device):
17481748
'ATA commands via the `smartctl` utility with device '
17491749
'%s do not succeed.', block_device.name)
17501750
return False
1751-
except OSError:
1751+
except OSError as e:
17521752
# Processutils can raise OSError if a path is not found,
17531753
# and it is okay that we tollerate that since it was the
17541754
# prior behavior.
1755+
LOG.warning('Unable to execute `smartctl` utility: %s', e)
17551756
return True
17561757

17571758
def _ata_erase(self, block_device):

0 commit comments

Comments
 (0)