Add option to enable ceph storage on controller
[apex-tripleo-heat-templates.git] / puppet / manifests / overcloud_compute.pp
index eef468d..ffa55cd 100644 (file)
@@ -33,6 +33,13 @@ file { ['/etc/libvirt/qemu/networks/autostart/default.xml',
   ensure => absent,
   before => Service['libvirt']
 }
+# in case libvirt has been already running before the Puppet run, make
+# sure the default network is destroyed
+exec { 'libvirt-default-net-destroy':
+  command => '/usr/bin/virsh net-destroy default',
+  onlyif => '/usr/bin/virsh net-info default | /bin/grep -i "^active:\s*yes"',
+  before => Service['libvirt'],
+}
 
 include ::nova
 include ::nova::compute
@@ -45,12 +52,10 @@ nova_config {
 $nova_enable_rbd_backend = hiera('nova_enable_rbd_backend', false)
 if $nova_enable_rbd_backend {
   include ::ceph::profile::client
-  include ::nova::compute::rbd
-  ceph::key { 'client.openstack' :
-    secret  => hiera('ceph::profile::params::mon_key'),
-    cap_mon => hiera('ceph_openstack_default_cap_mon'),
-    cap_osd => hiera('ceph_openstack_default_cap_osd'),
-    user    => 'nova',
+
+  $client_keys = hiera('ceph::profile::params::client_keys')
+  class { '::nova::compute::rbd':
+    libvirt_rbd_secret_key => $client_keys['client.openstack']['secret'],
   }
 }