cinder needs to support Images API v2.11

Bug #1898075 reported by Brian Rosmaita
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Brian Rosmaita
Victoria
Fix Committed
Low
Brian Rosmaita
Wallaby
Fix Committed
Low
Brian Rosmaita

Bug Description

Glance 2.11 changes the format of a "cinder" URI [0]. The old-style glance location URI for image data in a cinder-backed glance_store is this:
    cinder://<volume_id>
The new style in the case of multiple glance stores is:
    cinder://<glance_store_name>/<volume_id>

The current way we're extracting the volume_id from the URI (see [1,2]) is going to give us
    <glance_store_name>/<volume_id>
to work with as a "volume ID" for cinder, which won't match with any actual volume_id unless we process it some more.

The fix needs to be able to handle both legacy and new-style formats.

[0] Change-Id: I087a89c20813378fea8ff22ddf81d7a10c220db3
[1] https://github.com/openstack/cinder/blob/91da9df53200bc5d78cf7f3f5b967e41f3cafef9/cinder/volume/flows/manager/create_volume.py#L679-L680
[2] https://github.com/openstack/cinder/blob/91da9df53200bc5d78cf7f3f5b967e41f3cafef9/cinder/volume/manager.py#L1608

Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

This patch adds the v2.11 API to Glance: https://review.opendev.org/#/c/755088/
This patch adds it to victoria: https://review.opendev.org/#/c/755090/

summary: - cinder support for Images API v2.11
+ cinder needs to support Images API v2.11
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/755654

Changed in cinder:
status: Triaged → In Progress
Revision history for this message
Brian Rosmaita (brian-rosmaita) wrote :

I've been testing this, and while Cinder does indeed not understand the 2.11 cinder:// urls, this bug doesn't "break" Cinder because when Cinder can't find the volume containing the image, it just downloads the image from Glance and creates the volume that way. So while the bug prevents Cinder from using the optimized work flow, it doesn't prevent creation of volumes from images.

tags: added: api glance glance-store image
Changed in cinder:
milestone: 17.0.1 → xena-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/cinder/+/805877

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

Reviewed: https://review.opendev.org/c/openstack/cinder/+/755654
Committed: https://opendev.org/openstack/cinder/commit/4a5ff4eb7577867bc1a6b89718ecd66888430d84
Submitter: "Zuul (22348)"
Branch: master

commit 4a5ff4eb7577867bc1a6b89718ecd66888430d84
Author: Brian Rosmaita <email address hidden>
Date: Thu Oct 1 17:30:39 2020 -0400

    Support Images API v2.11

    Glance has changed the format of the cinder URIs in image locations
    so that they can look like
       cinder://glance-store-name/volume_id
    in addition to the legacy format
       cinder://volume_id

    Change the cinder code so that it can handle both formats for
    reading. (We only need to write the legacy format.)

    Change-Id: I8c176bf4c875061591bb6c94654a2cef643a4dcb
    Closes-bug: #1898075

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

Reviewed: https://review.opendev.org/c/openstack/cinder/+/805877
Committed: https://opendev.org/openstack/cinder/commit/e714a696a96c160ee8e4a110344c042e40c41556
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit e714a696a96c160ee8e4a110344c042e40c41556
Author: Brian Rosmaita <email address hidden>
Date: Thu Oct 1 17:30:39 2020 -0400

    Support Images API v2.11

    Glance has changed the format of the cinder URIs in image locations
    so that they can look like
       cinder://glance-store-name/volume_id
    in addition to the legacy format
       cinder://volume_id

    Change the cinder code so that it can handle both formats for
    reading. (We only need to write the legacy format.)

    Change-Id: I8c176bf4c875061591bb6c94654a2cef643a4dcb
    Closes-bug: #1898075
    (cherry picked from commit 4a5ff4eb7577867bc1a6b89718ecd66888430d84)

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

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/cinder/+/806038

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

This issue was fixed in the openstack/cinder 18.1.0 release.

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

Reviewed: https://review.opendev.org/c/openstack/cinder/+/806038
Committed: https://opendev.org/openstack/cinder/commit/8095a7af801e7b4511bde7e02412bcd6687eb1d1
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 8095a7af801e7b4511bde7e02412bcd6687eb1d1
Author: Brian Rosmaita <email address hidden>
Date: Thu Oct 1 17:30:39 2020 -0400

    Support Images API v2.11

    Glance has changed the format of the cinder URIs in image locations
    so that they can look like
       cinder://glance-store-name/volume_id
    in addition to the legacy format
       cinder://volume_id

    Change the cinder code so that it can handle both formats for
    reading. (We only need to write the legacy format.)

    Change-Id: I8c176bf4c875061591bb6c94654a2cef643a4dcb
    Closes-bug: #1898075
    (cherry picked from commit 4a5ff4eb7577867bc1a6b89718ecd66888430d84)
    (cherry picked from commit e714a696a96c160ee8e4a110344c042e40c41556)

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

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

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

This issue was fixed in the openstack/cinder 17.2.0 release.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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