Skip to content

Commit c9d00d9

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 f11ae6a commit c9d00d9

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
@@ -1688,10 +1688,11 @@ def _smartctl_security_check(self, block_device):
16881688
'ATA commands via the `smartctl` utility with device '
16891689
'%s do not succeed.', block_device.name)
16901690
return False
1691-
except OSError:
1691+
except OSError as e:
16921692
# Processutils can raise OSError if a path is not found,
16931693
# and it is okay that we tollerate that since it was the
16941694
# prior behavior.
1695+
LOG.warning('Unable to execute `smartctl` utility: %s', e)
16951696
return True
16961697

16971698
def _ata_erase(self, block_device):

0 commit comments

Comments
 (0)