format change should be disallowed when uploading encrypted volume as an image

Bug #1935688 reported by Brian Rosmaita
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Brian Rosmaita

Bug Description

The os-volume_upload_image action allows specification of optional disk_format and container_format for the image, but if non-default values are used (defaults are 'raw' and 'bare') when uploading a volume of an encrypted volume type, the operation later fails (verified when converting to qcow2).

Since this info is available to us in the REST API layer, we should check there and fail fast.

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/c/openstack/cinder/+/800272

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

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

commit de8b3b0b00421a01ed777880d2b5bf6fffc068d5
Author: Brian Rosmaita <email address hidden>
Date: Fri Jul 9 11:08:34 2021 -0400

    Reject bad img formats for uploaded encrypted vols

    Cinder only supports uploading volumes of encrypted volume types as
    images with disk format 'raw' and container format 'bare'. Screen
    for this at the REST API layer when the request is made.

    Change-Id: Ibb77b8b1be6c35c5db3b07fdc4056afd51d48782
    Closes-bug: #1935688

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

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

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

Reviewed: https://review.opendev.org/c/openstack/cinder/+/824158
Committed: https://opendev.org/openstack/cinder/commit/78682022d2dcf07c270356d23a27843578466469
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 78682022d2dcf07c270356d23a27843578466469
Author: Brian Rosmaita <email address hidden>
Date: Fri Jul 9 11:08:34 2021 -0400

    Reject bad img formats for uploaded encrypted vols

    Cinder only supports uploading volumes of encrypted volume types as
    images with disk format 'raw' and container format 'bare'. Screen
    for this at the REST API layer when the request is made.

    Change-Id: Ibb77b8b1be6c35c5db3b07fdc4056afd51d48782
    Closes-bug: #1935688
    (cherry picked from commit de8b3b0b00421a01ed777880d2b5bf6fffc068d5)

tags: added: in-stable-xena
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/+/824801

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

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

commit 12f7376fe44ea53e6e84dfd12577953bd841d25d
Author: Brian Rosmaita <email address hidden>
Date: Fri Jul 9 11:08:34 2021 -0400

    Reject bad img formats for uploaded encrypted vols

    Cinder only supports uploading volumes of encrypted volume types as
    images with disk format 'raw' and container format 'bare'. Screen
    for this at the REST API layer when the request is made.

    This change is applied directly to the VolumeActionsController in
    the cinder.api.contrib module, so it affects both the Block Storage
    API v2 and v3.

    Change-Id: Ibb77b8b1be6c35c5db3b07fdc4056afd51d48782
    Closes-bug: #1935688
    (cherry picked from commit de8b3b0b00421a01ed777880d2b5bf6fffc068d5)
    (cherry picked from commit 78682022d2dcf07c270356d23a27843578466469)

tags: added: in-stable-wallaby
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/+/827776

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

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

commit fac676112da484e8ad2627de4333ab72b70fe5c8
Author: Brian Rosmaita <email address hidden>
Date: Fri Jul 9 11:08:34 2021 -0400

    Reject bad img formats for uploaded encrypted vols

    Cinder only supports uploading volumes of encrypted volume types as
    images with disk format 'raw' and container format 'bare'. Screen
    for this at the REST API layer when the request is made.

    This change is applied directly to the VolumeActionsController in
    the cinder.api.contrib module, so it affects both the Block Storage
    API v2 and v3.

    Change-Id: Ibb77b8b1be6c35c5db3b07fdc4056afd51d48782
    Closes-bug: #1935688
    (cherry picked from commit de8b3b0b00421a01ed777880d2b5bf6fffc068d5)
    (cherry picked from commit 78682022d2dcf07c270356d23a27843578466469)
    (cherry picked from commit 12f7376fe44ea53e6e84dfd12577953bd841d25d)

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

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

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

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

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

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

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

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

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

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

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

Reviewed: https://review.opendev.org/c/openstack/cinder/+/828890
Committed: https://opendev.org/openstack/cinder/commit/7c3f7379feb41664c3881de99b54ca13a6b8ec61
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 7c3f7379feb41664c3881de99b54ca13a6b8ec61
Author: Brian Rosmaita <email address hidden>
Date: Fri Jul 9 11:08:34 2021 -0400

    Reject bad img formats for uploaded encrypted vols

    Cinder only supports uploading volumes of encrypted volume types as
    images with disk format 'raw' and container format 'bare'. Screen
    for this at the REST API layer when the request is made.

    This change is applied directly to the VolumeActionsController in
    the cinder.api.contrib module, so it affects both the Block Storage
    API v2 and v3.

    Change-Id: Ibb77b8b1be6c35c5db3b07fdc4056afd51d48782
    Closes-bug: #1935688
    (cherry picked from commit de8b3b0b00421a01ed777880d2b5bf6fffc068d5)
    (cherry picked from commit 78682022d2dcf07c270356d23a27843578466469)
    (cherry picked from commit 12f7376fe44ea53e6e84dfd12577953bd841d25d)
    (cherry picked from commit fac676112da484e8ad2627de4333ab72b70fe5c8)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/train)

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

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

Reviewed: https://review.opendev.org/c/openstack/cinder/+/837311
Committed: https://opendev.org/openstack/cinder/commit/513ba07ed6a434313f4f6e66d113b4368d4694a7
Submitter: "Zuul (22348)"
Branch: stable/train

commit 513ba07ed6a434313f4f6e66d113b4368d4694a7
Author: Brian Rosmaita <email address hidden>
Date: Fri Jul 9 11:08:34 2021 -0400

    Reject bad img formats for uploaded encrypted vols

    Cinder only supports uploading volumes of encrypted volume types as
    images with disk format 'raw' and container format 'bare'. Screen
    for this at the REST API layer when the request is made.

    This change is applied directly to the VolumeActionsController in
    the cinder.api.contrib module, so it affects both the Block Storage
    API v2 and v3.

    Change-Id: Ibb77b8b1be6c35c5db3b07fdc4056afd51d48782
    Closes-bug: #1935688
    (cherry picked from commit de8b3b0b00421a01ed777880d2b5bf6fffc068d5)
    (cherry picked from commit 78682022d2dcf07c270356d23a27843578466469)
    (cherry picked from commit 12f7376fe44ea53e6e84dfd12577953bd841d25d)
    (cherry picked from commit fac676112da484e8ad2627de4333ab72b70fe5c8)
    (cherry picked from commit 7c3f7379feb41664c3881de99b54ca13a6b8ec61)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder train-eol

This issue was fixed in the openstack/cinder train-eol release.

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

This issue was fixed in the openstack/cinder ussuri-eol 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.