nova/nova/tests/unit/virt/libvirt/volume
Patrick East 6bc074587a libvirt: add discard support for attached volumes
If Cinder reports discard=true capability then add
discard=unmap to disk config setting on attached volume.

To have this actually provide unmap/trim support the instance must have
been configured with a controller+bus type that can support it. As of
now the only one known not to work is virtio-blk. In the case where we
detect a configuration that will not work a warning will be logged, but
the attachment will continue with the default behavior.

An example of how to get a controller and bus to support this is to set
the following Glance properties on an image:

hw_scsi_model=virtio-scsi
hw_disk_bus=scsi

This feature also has some requirements for the libvirt and qemu
versions being used. There is a check to ensure that libvirt is at least
1.0.6 and qemu is at least 1.6.0. If the minimum versions are not met
a warning will be logged, but the attachment will continue with the
default behavior.

Change-Id: Icd2d20bb6906d9106df34a970b3d81b17bc3ec07
Implements: bp cinder-backend-report-discard
2016-01-08 13:07:36 -08:00
..
__init__.py libvirt: move volume/remotefs/quobyte modules under volume subdir 2015-07-28 17:46:05 -07:00
test_aoe.py libvirt: move LibvirtAOEVolumeDriver into it's own module 2015-08-02 17:45:55 -07:00
test_fibrechannel.py libvirt: move LibvirtFibreChannelVolumeDriver into it's own module 2015-08-02 17:45:55 -07:00
test_fs.py Introduce LibvirtBaseFileSystemVolumeDriver 2015-08-06 07:01:58 -07:00
test_glusterfs.py Fix order of arguments in assertEqual 2015-09-09 05:23:07 -07:00
test_gpfs.py libvirt: move the LibvirtGPFSVolumeDriver into it's own module 2015-07-28 17:46:06 -07:00
test_hgst.py Add os_brick-based VolumeDriver for HGST connector 2015-08-06 08:40:06 +00:00
test_iscsi.py Fix order of arguments in assertEqual 2015-09-09 05:23:07 -07:00
test_iser.py libvirt: move LibvirtISERVolumeDriver into it's own module 2015-08-05 09:29:24 -07:00
test_net.py Fix order of arguments in assertEqual 2015-09-09 05:23:07 -07:00
test_nfs.py Rollback of live-migration fails with the NFS driver 2015-09-28 17:25:40 +09:00
test_quobyte.py Fix order of arguments in assertEqual 2015-09-09 05:23:07 -07:00
test_remotefs.py libvirt:Rsync compression removed 2015-09-07 14:01:29 +00:00
test_scaleio.py Add os-brick based LibvirtVolumeDriver for ScaleIO 2015-08-07 23:47:02 -04:00
test_scality.py ScalityVolume:fix how remote FS mount is detected 2015-11-09 17:07:21 +01:00
test_smbfs.py libvirt: move LibvirtSMBFSVolumeDriver into it's own module 2015-08-02 17:45:55 -07:00
test_volume.py libvirt: add discard support for attached volumes 2016-01-08 13:07:36 -08:00