Confusing error message when volume create fails

Bug #1846532 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Fan Zhang
Queens
Fix Committed
Low
Fan Zhang
Rocky
Fix Committed
Low
Fan Zhang
Stein
Fix Committed
Low
Fan Zhang
Train
Fix Committed
Low
Fan Zhang

Bug Description

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.

Changed in nova:
assignee: Fan Zhang (fanzhang) → Matt Riedemann (mriedem)
Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → Fan Zhang (fanzhang)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/678991
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0f9311fae19e4e204cdc601acbe7dafc49c73661
Submitter: Zuul
Branch: master

commit 0f9311fae19e4e204cdc601acbe7dafc49c73661
Author: Fan Zhang <email address hidden>
Date: Wed Aug 28 11:16:25 2019 +0800

    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 <email address hidden>

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/688072

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/688073

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/688089

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/688090

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/train)

Reviewed: https://review.opendev.org/688072
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=821506a50c13c73a2877e20ed9efc37a80e5dff8
Submitter: Zuul
Branch: stable/train

commit 821506a50c13c73a2877e20ed9efc37a80e5dff8
Author: Fan Zhang <email address hidden>
Date: Wed Aug 28 11:16:25 2019 +0800

    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 <email address hidden>
    (cherry picked from commit 0f9311fae19e4e204cdc601acbe7dafc49c73661)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/stein)

Reviewed: https://review.opendev.org/688073
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c0313bce0685b5c1b5f57502711ea9d88d67a332
Submitter: Zuul
Branch: stable/stein

commit c0313bce0685b5c1b5f57502711ea9d88d67a332
Author: Fan Zhang <email address hidden>
Date: Wed Aug 28 11:16:25 2019 +0800

    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 <email address hidden>
    (cherry picked from commit 0f9311fae19e4e204cdc601acbe7dafc49c73661)
    (cherry picked from commit 821506a50c13c73a2877e20ed9efc37a80e5dff8)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/rocky)

Reviewed: https://review.opendev.org/688089
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=3903a906bf3e0c49971a7001e99c292ba8a41030
Submitter: Zuul
Branch: stable/rocky

commit 3903a906bf3e0c49971a7001e99c292ba8a41030
Author: Fan Zhang <email address hidden>
Date: Wed Aug 28 11:16:25 2019 +0800

    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 <email address hidden>
    (cherry picked from commit 0f9311fae19e4e204cdc601acbe7dafc49c73661)
    (cherry picked from commit 821506a50c13c73a2877e20ed9efc37a80e5dff8)
    (cherry picked from commit c0313bce0685b5c1b5f57502711ea9d88d67a332)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/queens)

Reviewed: https://review.opendev.org/688090
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=570664743cbc8bf2d853899ca3d67f277d6a0ed3
Submitter: Zuul
Branch: stable/queens

commit 570664743cbc8bf2d853899ca3d67f277d6a0ed3
Author: Fan Zhang <email address hidden>
Date: Wed Aug 28 11:16:25 2019 +0800

    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 <email address hidden>
    (cherry picked from commit 0f9311fae19e4e204cdc601acbe7dafc49c73661)
    (cherry picked from commit 821506a50c13c73a2877e20ed9efc37a80e5dff8)
    (cherry picked from commit c0313bce0685b5c1b5f57502711ea9d88d67a332)
    (cherry picked from commit 3903a906bf3e0c49971a7001e99c292ba8a41030)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.13

This issue was fixed in the openstack/nova 17.0.13 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 20.0.1

This issue was fixed in the openstack/nova 20.0.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 19.1.0

This issue was fixed in the openstack/nova 19.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.3.0

This issue was fixed in the openstack/nova 18.3.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.