summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2020-04-24 11:13:59 +0000
committerGerrit Code Review <review@openstack.org>2020-04-24 11:13:59 +0000
commitf8c97c6c2a5ef00a80da24ef2e89828f8d64292e (patch)
tree190af9a75a8045e6ca168ba2c7a05b84e8dfdbde
parentd21b82b424c62c1cc0d0a81266930575623fa031 (diff)
parent722d9d45218eeaa0285907cdc12ec77968b5693a (diff)
downloadironic-f8c97c6c2a5ef00a80da24ef2e89828f8d64292e.tar.gz
Merge "Fix SpanLength calculation for DRAC RAID configuration" into stable/stein
-rw-r--r--ironic/drivers/modules/drac/raid.py2
-rw-r--r--releasenotes/notes/bug-2004265-cd9056868295f374.yaml7
2 files changed, 8 insertions, 1 deletions
diff --git a/ironic/drivers/modules/drac/raid.py b/ironic/drivers/modules/drac/raid.py
index 633216d1c..56f8cbc90 100644
--- a/ironic/drivers/modules/drac/raid.py
+++ b/ironic/drivers/modules/drac/raid.py
@@ -495,7 +495,7 @@ def _calculate_volume_props(logical_disk, physical_disks, free_space_mb):
error_msg = _('invalid number of physical disks was provided')
raise exception.DracOperationError(error=error_msg)
- disks_per_span = len(selected_disks) / spans_count
+ disks_per_span = int(len(selected_disks) / spans_count)
# Best practice is to not pass span_length and span_depth when creating a
# RAID10. The iDRAC will dynamically calculate these values using maximum
diff --git a/releasenotes/notes/bug-2004265-cd9056868295f374.yaml b/releasenotes/notes/bug-2004265-cd9056868295f374.yaml
new file mode 100644
index 000000000..5d25b5ea8
--- /dev/null
+++ b/releasenotes/notes/bug-2004265-cd9056868295f374.yaml
@@ -0,0 +1,7 @@
+---
+fixes:
+ - |
+ Fixes 'Invalid parameter value for SpanLength' when configuring RAID
+ using Python 3. This passed incorrect data type to iDRAC, e.g., instead
+ of `2` it passed `2.0`.
+ See `story 2004265 <https://storyboard.openstack.org/#!/story/2004265>`_.