Add ability to support discard/unmap/trim for Cinder backend

Registered by Danny Wilson on 2015-07-27

During volume attach if a cinder backend supports discard Nova should enable this. This functionality requires properties in the glance image to enable creation of the correct scsi controller on the instance.

Required glance properties are
hw_scsi_model=virtio-scsi
hw_disk_bus=scsi

Without the correct glance properties this flag will be ignored. The old scsi connector just ignores this setting.

A check is also added to make sure the minimum version of QEMU is present. If min version requirement is not satisfied the discard flag will not be added to the attached volume.

Work is required on Cinder side to make use of this functionality.

Cinder BP: https://blueprints.launchpad.net/cinder/+spec/cinder-backend-report-discard
Cinder Spec: Updated version https://review.openstack.org/#/c/211583/
Cinder Patch: https://review.openstack.org/#/c/205717/

Blueprint information

Status:
Complete
Approver:
Matt Riedemann
Priority:
Low
Drafter:
Danny Wilson
Direction:
Approved
Assignee:
Pure Storage Openstack Team
Definition:
Approved
Series goal:
Accepted for mitaka
Implementation:
Implemented
Milestone target:
milestone icon mitaka-2
Started by
Matt Riedemann on 2015-11-03
Completed by
Matt Riedemann on 2016-01-13

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/cinder-backend-report-discard,n,z

Addressed by: https://review.openstack.org/205726
    libvirt: add virtio-scsi support for attached volumes

Addressed by: https://review.openstack.org/207615
    Add ability to support discard/unmap/trim for Cinder backend

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.