Skip to content

Commit 4fd3f25

Browse files
committed
Make mdadm a soft requirement
No point in requiring it for deployments that don't use software RAID. Change-Id: I8b40f02cc81d3154f98fa3f2cbb4d3c7319291b8 (cherry picked from commit ab8dee0)
1 parent 31e9d0d commit 4fd3f25

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

ironic_python_agent/hardware.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,10 @@ def is_md_device(raid_device):
282282
utils.execute('mdadm', '--detail', raid_device)
283283
LOG.debug("%s is an md device", raid_device)
284284
return True
285+
except FileNotFoundError:
286+
LOG.debug('mdadm has not been found, assuming %s is not an md device',
287+
raid_device)
288+
return False
285289
except processutils.ProcessExecutionError:
286290
LOG.debug("%s is not an md device", raid_device)
287291
return False
@@ -333,6 +337,9 @@ def _md_scan_and_assemble():
333337
"""
334338
try:
335339
utils.execute('mdadm', '--assemble', '--scan', '--verbose')
340+
except FileNotFoundError:
341+
LOG.warning('mdadm has not been found, RAID devices will not be '
342+
'supported')
336343
except processutils.ProcessExecutionError:
337344
LOG.info('No new RAID devices assembled during start-up')
338345

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
fixes:
3+
- |
4+
The ``mdadm`` utility is no longer a hard requirement. It's still required
5+
if software RAID is used (even when not managed by ironic).

0 commit comments

Comments
 (0)