Enable libvirt discard support

Bug #1781382 reported by Edward Hope-Morley
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Cinder Charm
Invalid
Low
Unassigned
OpenStack Cinder-Ceph charm
Fix Released
Low
Edward Hope-Morley
OpenStack Nova Compute Charm
Fix Released
Low
Edward Hope-Morley

Bug Description

In order for guest instances to be able to issue discard requests against their backing storage Nova needs to enable discard=unmap in libvirt (added back in the Juno release [1]). If we enable this by default in the nova-compute charm it will allow users to optionally enable and use discard/trim in their instances (as long as they are created using the correct properties from glance i.e. hw_disk_bus=scsi and hw_scsi_model=virtio-scsi hw_disk_bus=scsi). Note that this is limited to Nova storage i.e. cinder attached volumes will need the same functionality enabled in Cinder to allow discard to be enabled for attached volumes [2][3].

[1] https://specs.openstack.org/openstack/nova-specs/specs/juno/implemented/libvirt-disk-discard-option.html
[2] https://specs.openstack.org/openstack/cinder-specs/specs/liberty/cinder-backend-report-discard.html
[3] https://specs.openstack.org/openstack/nova-specs/specs/mitaka/implemented/cinder-backend-report-discard.html

Tags: sts
Changed in charm-nova-compute:
milestone: none → 18.11
milestone: 18.11 → 18.08
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-nova-compute (master)

Fix proposed to branch: master
Review: https://review.openstack.org/582134

Revision history for this message
Edward Hope-Morley (hopem) wrote :

Adding cinder so that we can enable there also.

Changed in charm-nova-compute:
status: New → In Progress
Changed in charm-cinder:
importance: Undecided → Low
milestone: none → 18.08
James Page (james-page)
Changed in charm-cinder:
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-nova-compute (master)

Reviewed: https://review.openstack.org/582134
Committed: https://git.openstack.org/cgit/openstack/charm-nova-compute/commit/?id=2f9bbed3a9a3b1a541124f484ae324a809262fb5
Submitter: Zuul
Branch: master

commit 2f9bbed3a9a3b1a541124f484ae324a809262fb5
Author: Edward Hope-Morley <email address hidden>
Date: Thu Jul 12 11:27:22 2018 +0100

    Enable discard

    By default discard/trim requests are disabled for libvirt. This
    patch enables them by default although in order to actually use
    them, instances still need be using scsi disk devices. Also this
    patch only permits Nova storage (e.g. instance root disk) to use
    discard. For Cinder volumes this must be enabled in Cinder.

    Change-Id: Iceb22fe5206629bc7b4096f518b8977c2e14def3
    Closes-Bug: #1781382

Changed in charm-nova-compute:
status: In Progress → Fix Committed
David Ames (thedac)
Changed in charm-nova-compute:
status: Fix Committed → Fix Released
James Page (james-page)
Changed in charm-cinder:
milestone: 18.08 → 18.11
Changed in charm-cinder-ceph:
importance: Undecided → Low
milestone: none → 18.11
status: New → Triaged
Changed in charm-cinder-ceph:
assignee: nobody → Edward Hope-Morley (hopem)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-cinder-ceph (master)

Fix proposed to branch: master
Review: https://review.openstack.org/605654

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

Reviewed: https://review.openstack.org/605654
Committed: https://git.openstack.org/cgit/openstack/charm-cinder-ceph/commit/?id=9444b4402cfd3c38d737b2bcdda4fd883319d21a
Submitter: Zuul
Branch: master

commit 9444b4402cfd3c38d737b2bcdda4fd883319d21a
Author: Edward Hope-Morley <email address hidden>
Date: Thu Sep 27 12:10:03 2018 +0100

    Enable discard

    By default nova/libvirt will not enable trim for
    attached volumes so to allow users to use this
    feature we now enable it by default.

    Also removed < Icehouse unit test.

    Change-Id: I58ffaa43e2836068aeed7795df670d279d5e28f8
    Closes-Bug: #1781382

Changed in charm-cinder-ceph:
status: In Progress → Fix Committed
Changed in charm-cinder:
status: Triaged → Invalid
milestone: 18.11 → none
David Ames (thedac)
Changed in charm-cinder-ceph:
status: Fix Committed → 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.