The 'hw:mem_page_size' extra spec allows you to specify values in three
ways: via a relative size alias (large, small, any), via exact byte
values, and via an SI/IEC/mixed representation (e.g. 2MB, 1GB).
Currently, attempting to use an invalid variant of the latter, such as
'2M', will raise a rather confusing error message:
Invalid memory page size '0'
Correct this so we instead see something like so:
Invalid memory page size '2M'
Changes:
nova/virt/hardware.py
NOTE(stephenfin): We need to drop use of 'raise...from', which is Python
3-only syntax. The net effect of this change is uglier (but still valid)
tracebacks.
Change-Id: I3af99f03514904da09f7b71f430b43bf75e8be67
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-Bug: #1879964
(cherry picked from commit f76d09b19d)
(cherry picked from commit eedc0b5ff3)