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
This commit is contained in:
Mark Goddard
2022年06月24日 16:47:18 +01:00
parent f08f70134d
commit b68fa6b2e1

View File

@@ -1653,10 +1653,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):
Reference in New Issue
openstack/ironic-python-agent
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.