Skip to content

Commit de4cf64

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 57f1e53 commit de4cf64

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
@@ -1807,10 +1807,11 @@ def _smartctl_security_check(self, block_device):
18071807
'ATA commands via the `smartctl` utility with device '
18081808
'%s do not succeed.', block_device.name)
18091809
return False
1810-
except OSError:
1810+
except OSError as e:
18111811
# Processutils can raise OSError if a path is not found,
18121812
# and it is okay that we tollerate that since it was the
18131813
# prior behavior.
1814+
LOG.warning('Unable to execute `smartctl` utility: %s', e)
18141815
return True
18151816

18161817
def _ata_erase(self, block_device):

0 commit comments

Comments
 (0)