diff --git a/playbooks/roles/os_nova/defaults/main.yml b/playbooks/roles/os_nova/defaults/main.yml index 3ea4e9b4cf..22281eec6d 100644 --- a/playbooks/roles/os_nova/defaults/main.yml +++ b/playbooks/roles/os_nova/defaults/main.yml @@ -250,6 +250,8 @@ nova_recreate_keys: False #nova_libvirt_images_rbd_pool: vms nova_ceph_client: '{{ cinder_ceph_client }}' nova_ceph_client_uuid: 517a4663-3927-44bc-9ea7-4a90e1cd4c66 +nova_libvirt_disk_cachemodes: '{{ nova_libvirt_images_rbd_pool is defined | ternary("network=writeback", "") }}' +nova_libvirt_hw_disk_discard: '{{ nova_libvirt_images_rbd_pool is defined | ternary("unmap", "ignore") }}' ## General Neutron configuration # If ``nova_osapi_compute_workers`` is unset the system will use half the number of available VCPUS to diff --git a/playbooks/roles/os_nova/templates/nova.conf.j2 b/playbooks/roles/os_nova/templates/nova.conf.j2 index 098e76c7d1..c1c31dd66f 100644 --- a/playbooks/roles/os_nova/templates/nova.conf.j2 +++ b/playbooks/roles/os_nova/templates/nova.conf.j2 @@ -254,4 +254,5 @@ images_rbd_pool = {{ nova_libvirt_images_rbd_pool }} images_rbd_ceph_conf = /etc/ceph/ceph.conf live_migration_flag="VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST" {% endif %} - +hw_disk_discard = {{ nova_libvirt_hw_disk_discard }} +disk_cachemodes = {{ nova_libvirt_disk_cachemodes }}