Skip to content

Commit b68fa6b

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
1 parent f08f701 commit b68fa6b

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
@@ -1653,10 +1653,11 @@ def _smartctl_security_check(self, block_device):
16531653
'ATA commands via the `smartctl` utility with device '
16541654
'%s do not succeed.', block_device.name)
16551655
return False
1656-
except OSError:
1656+
except OSError as e:
16571657
# Processutils can raise OSError if a path is not found,
16581658
# and it is okay that we tollerate that since it was the
16591659
# prior behavior.
1660+
LOG.warning('Unable to execute `smartctl` utility: %s', e)
16601661
return True
16611662

16621663
def _ata_erase(self, block_device):

0 commit comments

Comments
 (0)