diff options
| author | Zuul <zuul@review.opendev.org> | 2020-11-23 19:37:59 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2020-11-23 19:37:59 +0000 |
| commit | 22985da7101b0cb608dcf6656169f7d59c3ffd22 (patch) | |
| tree | c4753c7d751cbfa64f556b82641afb24789e0f14 /ironic_python_agent/hardware.py | |
| parent | 2c91494941c85306a74a331f2f22c4ecaa792bfb (diff) | |
| parent | ab8dee03867a5868bc1ec99f45481313bab88660 (diff) | |
| download | ironic-python-agent-22985da7101b0cb608dcf6656169f7d59c3ffd22.tar.gz | |
Merge "Make mdadm a soft requirement"
Diffstat (limited to 'ironic_python_agent/hardware.py')
| -rw-r--r-- | ironic_python_agent/hardware.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ironic_python_agent/hardware.py b/ironic_python_agent/hardware.py index cb8e34fc..345d7a5e 100644 --- a/ironic_python_agent/hardware.py +++ b/ironic_python_agent/hardware.py @@ -311,6 +311,10 @@ def is_md_device(raid_device): utils.execute('mdadm', '--detail', raid_device) LOG.debug("%s is an md device", raid_device) return True + except FileNotFoundError: + LOG.debug('mdadm has not been found, assuming %s is not an md device', + raid_device) + return False except processutils.ProcessExecutionError: LOG.debug("%s is not an md device", raid_device) return False @@ -362,6 +366,9 @@ def _md_scan_and_assemble(): """ try: utils.execute('mdadm', '--assemble', '--scan', '--verbose') + except FileNotFoundError: + LOG.warning('mdadm has not been found, RAID devices will not be ' + 'supported') except processutils.ProcessExecutionError: LOG.info('No new RAID devices assembled during start-up') |
