StorPool: encrypted volumes cannot be attached

Bug #1939241 reported by Peter Penchev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Peter Penchev

Bug Description

The StorPool Cinder driver still overrides the internal _attach_volume() and _detach_volume() methods, even after the base driver was modified to use os-brick for attaching volumes locally e.g. for transferring Glance image data. This, coupled with the fact that _attach_volume() (through _connect_device()) is now supposed to also return connection information, leads to an attempt to access missing connection information after attaching an encrypted volume.

The fix is trivial: remove the _attach_volume() and _detach_volume() methods from the StorPool driver, as done in https://review.opendev.org/c/openstack/cinder/+/787296

The patch from the above review has been in use in the StorPool driver's CI system since April; actually, the Cinder/Nova encrypted volume tests did not pass without it. We believe that the "cannot attach encrypted volumes" bug (due to the missing "conn" member of the returned structure) has been present at least since the Newton release, so the fix should probably be backported at least to Wallaby, if not earlier.

Thanks in advance for your time, and keep up the great work!

Changed in cinder:
status: New → In Progress
Revision history for this message
Sofia Enriquez (lsofia-enriquez) wrote :
Changed in cinder:
importance: Undecided → Medium
tags: added: attach encrypted encryption storpool volumes
Changed in cinder:
assignee: nobody → Peter Penchev (openstack-dev-s)
Eric Harney (eharney)
tags: added: drivers
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit 8a75d036f65a8da335170910f1820308dbfabedb
Author: Peter Penchev <email address hidden>
Date: Tue Apr 20 17:46:41 2021 +0300

    StorPool: drop _attach_volume() and _detach_volume()

    Our os-brick connector already handles the "keep track of which volume
    is attached for what reason" calls to storpool.spopenstack. However,
    we need to explicitly specify the access mode in initialize_connection()
    now, since our os-brick connector does not know how to divine it yet.
    (this will come later with the "attach snapshot" functionality)

    Incidentally, this fixes the "create an encrypted volume" flow, since
    our _attach_volume() implementation never actually returned a connector
    in the attachment info...

    Change-Id: I5da7ae04b87b4fd52a682a6545060e852174f6c8
    Closes-Bug: #1939241

Changed in cinder:
status: In Progress → Fix Released
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.