Ask Your Question

possibility of Resource duplication error

asked 2016-10-04 04:27:50 -0500

Durga gravatar image

updated 2016-10-04 14:52:01 -0500

DarylW gravatar image


I'm trying to add a new line with string




in /etc/nova/nova.conf using below code

file_line { 'available filters':
       ensure  => present,
       path    => '/etc/nova/nova.conf',
       line    => 'scheduler_available_filters=openstack.plugins.nova.valet_filter.ValetFilter',
       match   => '^scheduler_available_filters=openstack.plugins.nova.valet_filter.ValetFilter$',
       after   => '^scheduler_available_filters=nova.scheduler.filters.all_filters',

The same file is by default edited /etc/puppet/modules/nova/manifests/scheduler/filter.pp .

As Im using a puppet apply locally on the nova nodes i dont see any errors

My question is in puppet master -puppet agent scenario, is there chance of getting resource duplication error?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-10-04 15:07:52 -0500

DarylW gravatar image

In a scenario like the above, you only get resource duplication errors within the same catalog run.

If you do

puppet apply -e 'file{"/tmp/foo": content => "bar",}'

and your puppet master has the resource 'file{"/tmp/foo": content => "baz",}', You won't get any direct resource conflicts..

However, there is the potential for what I like to call a 'slow thrash' if you are managing the same resource in multiple places. I have seen that in our own code where we had a file/template managing the contents of a file, and then we had a file_line modifying the contents of that file.

In the above case, you will see the file be 'modified' every single puppet run, because the file resource will say 'your contents should be X' and then a file_line will come in and say 'that file should contain this line'. If they aren't in agreement, they will both try to 'win' the war of the contents of that file, with the last-run winning.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2016-10-04 04:27:50 -0500

Seen: 24 times

Last updated: Oct 04 '16