Superfluous "Create attachment failed for volume" error in nova-api logs

Bug #1797237 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Ken'ichi Ohmichi
Queens
Fix Committed
Medium
Matt Riedemann
Rocky
Fix Committed
Medium
Matt Riedemann

Bug Description

The nova-api logs an error when trying to attach an in-use volume to a server:

http://logs.openstack.org/91/607391/1/check/tempest-full-py3/b5b4c63/controller/logs/screen-n-api.txt.gz?level=TRACE#_Oct_04_20_25_02_115652

Oct 04 20:25:02.115652 ubuntu-xenial-rax-ord-0002619241 <email address hidden>[12723]: ERROR nova.volume.cinder [None req-45be0f9a-8af9-4886-9ef8-d09895704e36 tempest-AttachVolumeNegativeTest-1174814842 tempest-AttachVolumeNegativeTest-1174814842] [instance: 9b06c833-dd88-4dd0-a601-bf3dac884cb0] Create attachment failed for volume c87044fa-7299-4559-a605-0e5d92e4e50b. Error: Invalid volume: Volume c87044fa-7299-4559-a605-0e5d92e4e50b status must be available or downloading (HTTP 400) (Request-ID: req-c7739c6e-b110-4b0e-a0ee-62f3e530205e) Code: 400: cinderclient.exceptions.BadRequest: Invalid volume: Volume c87044fa-7299-4559-a605-0e5d92e4e50b status must be available or downloading (HTTP 400) (Request-ID: req-c7739c6e-b110-4b0e-a0ee-62f3e530205e)

This is normal and handled by the compute API which results in a 400 response to the user:

Oct 04 20:25:02.123693 ubuntu-xenial-rax-ord-0002619241 <email address hidden>[12723]: INFO nova.api.openstack.wsgi [None req-45be0f9a-8af9-4886-9ef8-d09895704e36 tempest-AttachVolumeNegativeTest-1174814842 tempest-AttachVolumeNegativeTest-1174814842] HTTP exception thrown: Invalid input received: Invalid volume: Volume c87044fa-7299-4559-a605-0e5d92e4e50b status must be available or downloading (HTTP 400) (Request-ID: req-c7739c6e-b110-4b0e-a0ee-62f3e530205e)

We shouldn't log an error for that since it doesn't require operator intervention.

Tags: api logging
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/609547

Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Matt Riedemann (<email address hidden>) on branch: master
Review: https://review.openstack.org/609547
Reason: Dropped for https://review.openstack.org/#/c/581453/.

Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → Ken'ichi Ohmichi (oomichi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/581453
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5bef746c9b50537dde47278a208c4457b42896d0
Submitter: Zuul
Branch: master

commit 5bef746c9b50537dde47278a208c4457b42896d0
Author: Ken'ichi Ohmichi <email address hidden>
Date: Tue Jul 10 18:57:48 2018 +0000

    Avoid BadRequest error log on volume attachment

    At the gate, only AttachVolumeNegativeTest makes nova-api output
    error log as a negative test case like:

      ERROR nova.volume.cinder [None req-dcc8814f-7439-44c8-872e-86ea51f4b319
       tempest-AttachVolumeNegativeTest-431575524
       tempest-AttachVolumeNegativeTest-431575524]
       [instance: ca526f93-e723-4372-a1c1-4fa03ffc1bd7]
       Create attachment failed for volume 0a6e6a92-f095-4ab7-803c-826934824418.
       Error: Invalid volume: Volume 0a6e6a92-f095-4ab7-803c-826934824418 status
         must be available or downloading (HTTP 400)
         (Request-ID: req-5e5074ea-cd12-43ed-9355-5db539ca9720)
       Code: 400:
       BadRequest: Invalid volume: Volume 0a6e6a92-f095-4ab7-803c-826934824418
         status must be available or downloading (HTTP 400)
         (Request-ID: req-5e5074ea-cd12-43ed-9355-5db539ca9720)

    Operators don't need to take care of BadRequest cases in general because
    that is due to end user mistakes. So this patch makes nova-api avoiding
    such error log case.

    Closes-Bug: #1797237

    Change-Id: I22d9d974822282ffc3c0942d4766b135717dd369

Changed in nova:
status: In Progress → Fix Released
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.openstack.org/640110

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.openstack.org/640116

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

Reviewed: https://review.openstack.org/640110
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=35a050a520683c104b8ba170cdca49ee0f9c9088
Submitter: Zuul
Branch: stable/rocky

commit 35a050a520683c104b8ba170cdca49ee0f9c9088
Author: Ken'ichi Ohmichi <email address hidden>
Date: Tue Jul 10 18:57:48 2018 +0000

    Avoid BadRequest error log on volume attachment

    At the gate, only AttachVolumeNegativeTest makes nova-api output
    error log as a negative test case like:

      ERROR nova.volume.cinder [None req-dcc8814f-7439-44c8-872e-86ea51f4b319
       tempest-AttachVolumeNegativeTest-431575524
       tempest-AttachVolumeNegativeTest-431575524]
       [instance: ca526f93-e723-4372-a1c1-4fa03ffc1bd7]
       Create attachment failed for volume 0a6e6a92-f095-4ab7-803c-826934824418.
       Error: Invalid volume: Volume 0a6e6a92-f095-4ab7-803c-826934824418 status
         must be available or downloading (HTTP 400)
         (Request-ID: req-5e5074ea-cd12-43ed-9355-5db539ca9720)
       Code: 400:
       BadRequest: Invalid volume: Volume 0a6e6a92-f095-4ab7-803c-826934824418
         status must be available or downloading (HTTP 400)
         (Request-ID: req-5e5074ea-cd12-43ed-9355-5db539ca9720)

    Operators don't need to take care of BadRequest cases in general because
    that is due to end user mistakes. So this patch makes nova-api avoiding
    such error log case.

    Closes-Bug: #1797237

    Change-Id: I22d9d974822282ffc3c0942d4766b135717dd369
    (cherry picked from commit 5bef746c9b50537dde47278a208c4457b42896d0)

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

This issue was fixed in the openstack/nova 19.0.0.0rc1 release candidate.

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

Reviewed: https://review.openstack.org/640116
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8f7b778f82cb4f7e8b3655d8b51bb4c6b94da1d0
Submitter: Zuul
Branch: stable/queens

commit 8f7b778f82cb4f7e8b3655d8b51bb4c6b94da1d0
Author: Ken'ichi Ohmichi <email address hidden>
Date: Tue Jul 10 18:57:48 2018 +0000

    Avoid BadRequest error log on volume attachment

    At the gate, only AttachVolumeNegativeTest makes nova-api output
    error log as a negative test case like:

      ERROR nova.volume.cinder [None req-dcc8814f-7439-44c8-872e-86ea51f4b319
       tempest-AttachVolumeNegativeTest-431575524
       tempest-AttachVolumeNegativeTest-431575524]
       [instance: ca526f93-e723-4372-a1c1-4fa03ffc1bd7]
       Create attachment failed for volume 0a6e6a92-f095-4ab7-803c-826934824418.
       Error: Invalid volume: Volume 0a6e6a92-f095-4ab7-803c-826934824418 status
         must be available or downloading (HTTP 400)
         (Request-ID: req-5e5074ea-cd12-43ed-9355-5db539ca9720)
       Code: 400:
       BadRequest: Invalid volume: Volume 0a6e6a92-f095-4ab7-803c-826934824418
         status must be available or downloading (HTTP 400)
         (Request-ID: req-5e5074ea-cd12-43ed-9355-5db539ca9720)

    Operators don't need to take care of BadRequest cases in general because
    that is due to end user mistakes. So this patch makes nova-api avoiding
    such error log case.

    Closes-Bug: #1797237

    Change-Id: I22d9d974822282ffc3c0942d4766b135717dd369
    (cherry picked from commit 5bef746c9b50537dde47278a208c4457b42896d0)
    (cherry picked from commit 35a050a520683c104b8ba170cdca49ee0f9c9088)

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

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

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

This issue was fixed in the openstack/nova 18.2.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.