Browse Source

Allow overriding RBD disk cache modes

Keep the default network=writeback setting, but allow it
to come from hiera overrides as well.

Change-Id: I47aaf4be463684f5b67820b8ebb5db44ba960b44
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
changes/26/792326/5
Bogdan Dobrelya 2 months ago
parent
commit
f12a143f52
  1. 5
      manifests/profile/base/nova/compute_libvirt_shared.pp
  2. 5
      releasenotes/notes/rbd-disk-cache-modes-b6b75fa2e52b8915.yaml

5
manifests/profile/base/nova/compute_libvirt_shared.pp

@ -38,8 +38,9 @@ class tripleo::profile::base::nova::compute_libvirt_shared (
) {
if $step >= 4 {
# Ceph + Libvirt
$rbd_ephemeral_storage = hiera('nova::compute::rbd::ephemeral_storage', false)
$rbd_ephemeral_storage = hiera('nova::compute::rbd::ephemeral_storage', false)
$rbd_persistent_storage = hiera('rbd_persistent_storage', false)
$rbd_disk_cachemodes = hiera('rbd_disk_cachemodes', ['network=writeback'])
if $rbd_ephemeral_storage or $rbd_persistent_storage {
include nova::compute::rbd
exec{ "exec-setfacl-${nova_rbd_client_name}-nova":
@ -56,7 +57,7 @@ class tripleo::profile::base::nova::compute_libvirt_shared (
if $rbd_ephemeral_storage {
class { 'nova::compute::libvirt':
disk_cachemodes => ['network=writeback'],
disk_cachemodes => $rbd_disk_cachemodes,
hw_disk_discard => 'unmap',
}
} else {

5
releasenotes/notes/rbd-disk-cache-modes-b6b75fa2e52b8915.yaml

@ -0,0 +1,5 @@
---
features:
- |
New hiera setting `rbd_disk_cachemodes` allows to override
the disk cache modes for RBD. Defaults to ['network=writeback'].
Loading…
Cancel
Save