Merge "Fix erasable devices check"

This commit is contained in:
Zuul
2025-09-29 23:16:39 +00:00
committed by Gerrit Code Review
2 changed files with 9 additions and 2 deletions

View File

@@ -2040,10 +2040,11 @@ class GenericHardwareManager(HardwareManager):
"""
erase_errors = {}
info = node.get('driver_internal_info', {})
if not self._list_erasable_devices:
erasable_devices = self._list_erasable_devices(node)
if not erasable_devices:
LOG.debug("No erasable devices have been found.")
return
for dev in self._list_erasable_devices(node):
for dev in erasable_devices:
safety_check_block_device(node, dev.name)
secure_erase_error = None
try:

View File

@@ -0,0 +1,6 @@
---
fixes:
- |
Fix a conditional which is supposed to check whether there are
any erasable devices. In the previous state, the conditional
was wrong as the call was missing the node as a parameter.