]> review.fuel-infra Code Review - puppet-modules/puppet-ceilometer.git/commitdiff
Fix notification relationship with Service[nova-compute]
authorMathieu Gagné <mgagne@iweb.com>
Mon, 8 Apr 2013 21:09:04 +0000 (17:09 -0400)
committerMathieu Gagné <mgagne@iweb.com>
Mon, 8 Apr 2013 21:09:04 +0000 (17:09 -0400)
Was getting an error when applying ceilometer::agent::compute:

  Could not find resource 'File_line[nova-notification-driver-common]
  File_line[nova-notification-driver-ceilometer]' for relationship
  on 'Service[nova-compute]'

manifests/agent/compute.pp
spec/classes/ceilometer_agent_compute_spec.rb

index f0316535147f779e9a35f81d6a0f36521e9962ee..de7188ed429ddbbe83388c8e23c5a7285f7ebce7 100644 (file)
@@ -67,15 +67,15 @@ class ceilometer::agent::compute (
     ],
   }
 
-  File_line['nova-notification-driver-common', 'nova-notification-driver-ceilometer'] ~> Service['nova-compute']
-
   file_line {
     'nova-notification-driver-common':
-      line => 'notification_driver=nova.openstack.common.notifier.rabbit_notifier',
-      path => '/etc/nova/nova.conf';
+      line   => 'notification_driver=nova.openstack.common.notifier.rabbit_notifier',
+      path   => '/etc/nova/nova.conf',
+      notify => Service['nova-compute'];
     'nova-notification-driver-ceilometer':
-      line => 'notification_driver=ceilometer.compute.nova_notifier',
-      path => '/etc/nova/nova.conf';
+      line   => 'notification_driver=ceilometer.compute.nova_notifier',
+      path   => '/etc/nova/nova.conf',
+      notify => Service['nova-compute'];
   }
 
 }
index 3ae359721be88269f78c7fd2238bf1a8c095fd12..e6586ee885d800d5f78f8d8faa8e51f05cf02742 100644 (file)
@@ -67,12 +67,14 @@ describe 'ceilometer::agent::compute' do
 
     it 'configures nova notification driver' do
       should contain_file_line('nova-notification-driver-common').with(
-        :line => 'notification_driver=nova.openstack.common.notifier.rabbit_notifier',
-        :path => '/etc/nova/nova.conf'
+        :line   => 'notification_driver=nova.openstack.common.notifier.rabbit_notifier',
+        :path   => '/etc/nova/nova.conf',
+        :notify => 'Service[nova-compute]'
       )
       should contain_file_line('nova-notification-driver-ceilometer').with(
-        :line => 'notification_driver=ceilometer.compute.nova_notifier',
-        :path => '/etc/nova/nova.conf'
+        :line   => 'notification_driver=ceilometer.compute.nova_notifier',
+        :path   => '/etc/nova/nova.conf',
+        :notify => 'Service[nova-compute]'
       )
     end
   end