Cinder: Logging issue when attachment fails

Bug #1970698 reported by Rajat Dhasmana
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glance_store
Fix Released
Undecided
Rajat Dhasmana
Wallaby
New
Undecided
Unassigned
Xena
New
Undecided
Unassigned

Bug Description

In case of glance cinder configuration, when we fail to attach a volume, the exception logging is not correct raises another exception

ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance cinderclient.exceptions.BadRequest: Invalid volume: Volume 12703adc-25bb-4f50-bf45-2a17a1afb13f status must be available or in-use or downloading to reserve, but the current status is reserved. (HTTP 400) (Request-ID: req-d9f3a8e2-8fdf-4471-b261-23633b80aaed)
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance During handling of the above exception, another exception occurred:
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance Traceback (most recent call last):
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance File "/opt/stack/glance/glance/notifier.py", line 412, in _get_chunk_data_iterator
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance for chunk in data:
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance File "/usr/local/lib/python3.8/dist-packages/glance_store/_drivers/cinder.py", line 835, in _cinder_volume_data_iterator
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance with self._open_cinder_volume(client, volume, 'rb') as fp:
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance return next(self.gen)
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance File "/usr/local/lib/python3.8/dist-packages/glance_store/_drivers/cinder.py", line 742, in _open_cinder_volume
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance attachment = attachment_state_manager.attach(client, volume_id,
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance File "/usr/local/lib/python3.8/dist-packages/glance_store/common/attachment_state_manager.py", line 251, in attach
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance attachment = attach_state.attach(client, volume_id, host, mode=mode)
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance File "/usr/local/lib/python3.8/dist-packages/glance_store/common/attachment_state_manager.py", line 193, in attach
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance LOG.exception(_LE('Error attaching volume %(volume_id)s',
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance TypeError: f() takes 1 positional argument but 2 were given
ápr 07 08:44:34 devstack0 <email address hidden>[850369]: ERROR glance

Changed in glance-store:
status: New → In Progress
Changed in glance-store:
assignee: nobody → Rajat Dhasmana (whoami-rajat)
Revision history for this message
Erno Kuvaja (jokke) wrote :

I just targeted quick something else than master so the bug does not get closed before we figure out which stable branches are affected.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance_store (master)

Reviewed: https://review.opendev.org/c/openstack/glance_store/+/838335
Committed: https://opendev.org/openstack/glance_store/commit/3ee399a1e35fbf9067f0548b69bc19ca48b8de5f
Submitter: "Zuul (22348)"
Branch: master

commit 3ee399a1e35fbf9067f0548b69bc19ca48b8de5f
Author: whoami-rajat <email address hidden>
Date: Tue Apr 19 00:03:18 2022 +0530

    Cinder: Correct exception logging during attach

    There is a syntax error in the exception logging when attaching a
    volume fails in attachment state manager. This patch corrects it
    and adds a test to guard against similar changes in future.

    Closes-Bug: #1970698

    Change-Id: I43c407046a49bb37631113e2ea65d05450f9365d

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

Fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/glance_store/+/841281

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

This issue was fixed in the openstack/glance_store 4.0.0 release.

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

Reviewed: https://review.opendev.org/c/openstack/glance_store/+/841281
Committed: https://opendev.org/openstack/glance_store/commit/69fd0dc513c8dd90741de8d0ddd72a973108ff8f
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 69fd0dc513c8dd90741de8d0ddd72a973108ff8f
Author: whoami-rajat <email address hidden>
Date: Tue Apr 19 00:03:18 2022 +0530

    Cinder: Correct exception logging during attach

    There is a syntax error in the exception logging when attaching a
    volume fails in attachment state manager. This patch corrects it
    and adds a test to guard against similar changes in future.

    Closes-Bug: #1970698

    Change-Id: I43c407046a49bb37631113e2ea65d05450f9365d
    (cherry picked from commit 3ee399a1e35fbf9067f0548b69bc19ca48b8de5f)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance_store 3.0.1

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