]> review.fuel-infra Code Review - puppet-modules/puppet-ceilometer.git/commit
Inline a custom file_line provider to fix agent.
authorDan Prince <dprince@redhat.com>
Thu, 29 Aug 2013 16:56:10 +0000 (12:56 -0400)
committerDan Prince <dprince@redhat.com>
Tue, 3 Sep 2013 17:17:29 +0000 (13:17 -0400)
commita3b324dba249f5db38a4ff71b9bb5bc0f7d68147
treefd543e5716c0e9d80c9dc5d14710ea979183d6b3
parentbfad5a3821886da6f1620f922e499d19a019148c
Inline a custom file_line provider to fix agent.

Fixes an issue in the ceilometer::agent::compute manifest
where nova.conf config values for the notification_driver
would get added to the wrong section (always to the end of
the file).

As part of the fix a custom file_line 'after' provider which
supports a new after option has been added.
This allows us to have some control over which section *new*
file lines go into. If there are any pre-existing matching
lines in the file the assumption is that they are already in
the correct section and can be edited in place.

NOTE: I've submitted a pull request to the upstream stdlib repo here
to add the new 'after' option:

  https://github.com/puppetlabs/puppetlabs-stdlib/pull/174

Once this (or something better) lands in stdlib we can update
puppet-ceilometer to use it.

Fixes LP Bug #1217867

Change-Id: Ic09f5232b322cde687d663d1ef38ef0fd12f32ff
lib/puppet/provider/file_line_after/ruby.rb [new file with mode: 0644]
lib/puppet/type/file_line_after.rb [new file with mode: 0644]
manifests/agent/compute.pp
spec/classes/ceilometer_agent_compute_spec.rb