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 <ken-oomi...@wx.jp.nec.com> 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 -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1797237 Title: Superfluous "Create attachment failed for volume" error in nova-api logs Status in OpenStack Compute (nova): Fix Released Status in OpenStack Compute (nova) queens series: Triaged Status in OpenStack Compute (nova) rocky series: Triaged 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 devstack@n-api.service[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 devstack@n-api.service[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. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1797237/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp