Puppet applies new file, then reverts it back

48 views
Skip to first unread message

Nicholas Miller

unread,
Dec 30, 2014, 8:38:05 AM12/30/14
to puppet...@googlegroups.com
Hi All,

I'm having a strange issue with one particular file where puppet applies the new file, then reverts back.  It does this every time puppet runs, see below:

C:\Program Files (x86)\Puppet Labs\Puppet\bin>puppet agent -t
Info: Retrieving plugin
Info: Caching catalog for nick-srvr2k8r2
Info: Applying configuration version '1418236525'
Notice: /Stage[main]/Lows/File[C:/LiveServices/LiveObjectWebServer/Plugins/LiveBuilder/_LiveBuilderP
lugin.lsp]/ensure: defined content as '{md5}19b37f4ae2f5066974d8040220cf12c9'
Notice: /Stage[main]/Lows/File[C:/LiveServices/LiveObjectWebServer/Plugins/LiveBuilder/LiveBuilderpl
ugin.lsp]/content:

Info: /Stage[main]/Lows/File[C:/LiveServices/LiveObjectWebServer/Plugins/LiveBuilder/LiveBuilderplug
in.lsp]: Filebucketed C:/LiveServices/LiveObjectWebServer/Plugins/LiveBuilder/LiveBuilderplugin.lsp
to main with sum 19b37f4ae2f5066974d8040220cf12c9
Notice: /Stage[main]/Lows/File[C:/LiveServices/LiveObjectWebServer/Plugins/LiveBuilder/LiveBuilderpl
ugin.lsp]/content: content changed '{md5}19b37f4ae2f5066974d8040220cf12c9' to '{md5}2ceac858687a8db9
762cfbcba9c30d6a'
Notice: /Stage[main]/Lows/File[C:/LiveServices/LiveObjectWebServer/Plugins/LiveBuilder/LiveBuilderPl
ugin.lsp]/content:

Info: /Stage[main]/Lows/File[C:/LiveServices/LiveObjectWebServer/Plugins/LiveBuilder/LiveBuilderPlug
in.lsp]: Filebucketed C:/LiveServices/LiveObjectWebServer/Plugins/LiveBuilder/LiveBuilderPlugin.lsp
to main with sum 2ceac858687a8db9762cfbcba9c30d6a
Notice: /Stage[main]/Lows/File[C:/LiveServices/LiveObjectWebServer/Plugins/LiveBuilder/LiveBuilderPl
ugin.lsp]/content: content changed '{md5}2ceac858687a8db9762cfbcba9c30d6a' to '{md5}19b37f4ae2f50669
74d8040220cf12c9'
Info: lows_plugins: Scheduling refresh of Exec[lows_restart]
Notice: /Stage[main]/Lows/Exec[lows_restart]: Triggered 'refresh' from 1 events
Info: /Stage[main]/Lows/Exec[lows_restart]: Scheduling refresh of Exec[remove_temp]
Notice: /Stage[main]/Lows/Exec[remove_temp]: Triggered 'refresh' from 1 events
Notice: Finished catalog run in 12.11 seconds

Has anyone ever had this problem before?  Any ideas on how to fix it?

Thanks,
Nick

jcbollinger

unread,
Jan 5, 2015, 10:49:04 AM1/5/15
to puppet...@googlegroups.com


On Tuesday, December 30, 2014 7:38:05 AM UTC-6, Nicholas Miller wrote:
Hi All,

I'm having a strange issue with one particular file where puppet applies the new file, then reverts back.  It does this every time puppet runs, see below:

[...]

That is very strange.  Puppet should never manage the same resource twice in the same catalog run, and in any given run, Puppet should never modify the same property of the same resource more than once.  These are such fundamental Puppet principles that I'm inclined to guess that rather than Puppet doing either of the above, it is instead managing two distinct (from its perspective) resources that somehow resolve to the same physical resource.
 
Has anyone ever had this problem before?  Any ideas on how to fix it?


I have not had that problem, but if I have guessed right about its nature then you should look carefully at your manifests to find the resource duplication (which will revolve around something about the file name and / or path of two File resources that the catalog compiler doesn't recognize as being equivalent).  You could also look at the cached catalog to verify that there are indeed two file resources corresponding to the given file; if so, then it is conceivable that comparing them will reveal the nature of the collision.

In any event, it may be that running the agent with --debug output enabled will provide useful additional information.


John

Josh Cooper

unread,
Jan 6, 2015, 1:33:41 AM1/6/15
to puppet...@googlegroups.com
I've seen this sort of problem on Windows when mixing upper and lower case file paths, so given

  file { 'C:/foo':
    ensure => file,
    content => 'upper',
  }

  file { 'c:/foo':
    ensure => file,
    content => 'lower',
  }

Puppet will try to apply both resources, not realizing they are in fact the same resource on a Windows case-insensitive filesystem:

C:\work\puppet> bundle exec puppet apply file.pp
...
Notice: /Stage[main]/Main/File[C:/foo]/content: content changed '{md5}81e073b428b50247daba38531dcf412a' to '{md5}0122b4c2c01ee1c698ecc309d2b8eb5a'
Notice: /Stage[main]/Main/File[c:/foo]/content: content changed '{md5}0122b4c2c01ee1c698ecc309d2b8eb5a' to '{md5}81e073b428b50247daba38531dcf412a'

But the output from your agent run seems to use the same case...

Josh

--
Josh Cooper
Developer, Puppet Labs

Join us at PuppetConf 2015, October 5-9 in Portland, OR - http://2015.puppetconf.com.  
Register early to save 40%!

Alex Elman

unread,
Jan 6, 2015, 2:30:14 AM1/6/15
to puppet...@googlegroups.com

Josh is correct. The first resource has a character with a different case. Notice the p in the filename. You are managing two different resources from puppet's perspective.

C:/LiveServices/LiveObjectWebServer/Plugins/LiveBuilder/LiveBuilderplugin.lsp

Versus

C:/LiveServices/LiveObjectWebServer/Plugins/LiveBuilder/LiveBuilderPlugin.lsp

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CA%2Bu97u%3DLhj0F-N6V-j3jpxwi%2BNzN85HQ3SOPBrTd6UVAzy9XXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Nicholas Miller

unread,
Jan 6, 2015, 3:57:58 PM1/6/15
to puppet...@googlegroups.com
That was it!  Thank you very much!
Reply all
Reply to author
Forward
0 new messages