From: Mathieu Gagné Date: Mon, 8 Apr 2013 21:09:04 +0000 (-0400) Subject: Fix notification relationship with Service[nova-compute] X-Git-Tag: grizzly-eol~15^2~9^2~3 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=04ba91c789ad35127bb7077cdefe85bdd3480fac;p=puppet-modules%2Fpuppet-ceilometer.git Fix notification relationship with Service[nova-compute] 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]' --- diff --git a/manifests/agent/compute.pp b/manifests/agent/compute.pp index f031653..de7188e 100644 --- a/manifests/agent/compute.pp +++ b/manifests/agent/compute.pp @@ -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']; } } diff --git a/spec/classes/ceilometer_agent_compute_spec.rb b/spec/classes/ceilometer_agent_compute_spec.rb index 3ae3597..e6586ee 100644 --- a/spec/classes/ceilometer_agent_compute_spec.rb +++ b/spec/classes/ceilometer_agent_compute_spec.rb @@ -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