chocolatey.config idempotency

20 views
Skip to first unread message

proman

unread,
Aug 2, 2017, 10:04:06 AM8/2/17
to Puppet Users
Hi fellow puppet users, 

I've been busy to find out why my chocolatey.config file is not idempotent when i run puppet apply apply_manifest.pp( this file include the puppet code from the chocolatey.config) on a specifiek vm (windows-2012r2-x64). I use to get the same output even when i run it for 5 times for instance(that's what idempotency is all about), but every run seems differently. 

I'm lost where to search for this problem. Does anyone experienced this before? If yes, what was the fix? if no, any suggestions where to look at?

thanks in advance

jcbollinger

unread,
Aug 3, 2017, 8:56:31 AM8/3/17
to Puppet Users


On Wednesday, August 2, 2017 at 9:04:06 AM UTC-5, proman wrote:
I've been busy to find out why my chocolatey.config file is not idempotent when i run puppet apply apply_manifest.pp( this file include the puppet code from the chocolatey.config) on a specifiek vm (windows-2012r2-x64). I use to get the same output even when i run it for 5 times for instance(that's what idempotency is all about), but every run seems differently. 

I'm lost where to search for this problem. Does anyone experienced this before? If yes, what was the fix? if no, any suggestions where to look at?


Well, how about starting by figuring out what is changing between versions of the config file.  You haven't given us anything to go on, but here are some possibilities:
  • Maybe you are writing a timestamp into the file.  Naturally, that will change every time you apply the catalog, even if the meaning of the config file is unaffected by the change.
  • Maybe you are writing the same configuration details in different orders.
  • Maybe you are adding comments or blank lines.
  • Maybe you are adding duplicate entries.
  • Or maybe the semantic content of the file is actually changing -- for instance, you could be flip-flopping between two variations on the file.
All of those are things I've seen or heard about in other contexts, but it may also be that you've discovered something new.

Once you know what's changing, you should have a better idea what to look for in your manifests, and where to find it.


John

Reply all
Reply to author
Forward
0 new messages