nova/nova/volume
Fan Zhang c0313bce06 Fix exception translation when creating volume
Method `nova.volume.cinder.API#create` accepts `size` as the 3rd args,
but in wrapper of `nova.volume.cinder.translate_volume_exception`, the 3rd
parameter is volume_id. If we hit cinder exception when creating volumes
like the response body down below:
```
{"itemNotFound": {"message": "Volume type with name xxx could not be found.",
"code": 404}}
```
we may get exception in nova compute log like this:
```
BuildAbortException: Build of instance xxx aborted: Volume 40 could not be
found.
```
actually, `40` is volume size, not voluem id.

This could be a little misleading.

Closes-Bug: #1846532

Change-Id: If5b0c2f28773e0b2fcb008d5251fb69d950ca569
Signed-off-by: Fan Zhang <zh.f@outlook.com>
(cherry picked from commit 0f9311fae1)
(cherry picked from commit 821506a50c)
2019-10-11 17:17:57 +08:00
..
__init__.py Remove deprecated config option volume_api_class 2016-07-21 23:08:08 +08:00
cinder.py Fix exception translation when creating volume 2019-10-11 17:17:57 +08:00