Also, check to see if you have an exec somewhere that might be causing this and you're seeing a flapping issue.
Trevor On Wed, Dec 3, 2014 at 9:31 AM, jcbollinger <john.bollin...@stjude.org> wrote: > > > On Tuesday, December 2, 2014 10:03:53 PM UTC-6, chris smith wrote: >> >> Hi, >> >> This is a very strange one. On my CA server (which also runs puppet as >> an agent to control various things), sometimes a file gets turned into a >> directory. It's only this file and on this server (the other puppet >> controlled servers don't have this issue). >> >> Using puppet 3.7.3 from the puppetlabs yum repo. >> >> My manifest has this: >> >> file { '/usr/local/sbin/duplicity-backup.sh': >> ensure => file, >> owner => 'root', >> group => 'root', >> mode => '0755', >> source => 'puppet:///modules/duplicity/duplicity-backup.sh', >> } >> >> so pretty simple. The source exists and is a bash script. >> >> It starts off as a file: >> >> Dec 2 23:47:28 server puppet-agent[1072]: >> (/Stage[main]/Duplicity/File[/usr/local/sbin/duplicity-backup.sh]/ensure) >> defined >> content as '{md5}db1ad110a94782a2e0edc9f1b650a854' >> >> but turns into a directory: >> >> Dec 3 00:54:12 server puppet-agent[23986]: >> (/Stage[main]/Duplicity/File[/usr/local/sbin/duplicity-wrapper.sh]) >> Could not evaluate: Could not retrieve file metadata for >> puppet:///modules/duplicity/duplicity-wrapper.sh: Could not intern from >> text/pson: undefined method `delete' for >> #<Puppet::Resource::Catalog:0x7f3b29db1468> >> Dec 3 00:54:12 server puppet-agent[23986]: >> (/Stage[main]/Duplicity/File[/usr/local/sbin/duplicity-wrapper.sh]) >> Wrapped exception: >> Dec 3 00:54:12 server puppet-agent[23986]: >> (/Stage[main]/Duplicity/File[/usr/local/sbin/duplicity-wrapper.sh]) >> Could not intern from text/pson: undefined method `delete' for >> #<Puppet::Resource::Catalog:0x7f3b29db1468> >> Dec 3 00:54:12 server puppet-agent[23986]: >> (/Stage[main]/Duplicity/File[/usr/local/sbin/duplicity-backup.sh]/ensure) >> ensure >> changed 'file' to 'directory' >> >> > > I suggest you examine the node's cached copy of its catalog immediately > after such an event (before it is overwritten by the next catalog > request). If in fact the resource > File[/usr/local/sbin/duplicity-backup.sh] has 'file' as the value of its > 'ensure' property, then file a bug report, and tick up the severity / > priority. Bugs involving Puppet destroying data should -- and generally do > -- get quick attention. The catalog is human-readable, though not exactly > *easy* to read. > > My suspicion, however, is that that catalog actually specifies 'ensure' => > 'directory'. In that case, you'll need to focus your troubleshooting on > why that's so. The declaration you presented clearly specifies 'file', but > it is possible for that to be overridden elsewhere in your manifest set. > Alternatively, it may be that the declaration you present is not always the > one that is used. If you have multiple masters (e.g. in a load-balancing > setup) and their manifest sets, ENCs, or hiera data are not in sync, then > you might randomly get a different declaration. Or if you have multiple > environments defined, and for some reason the affected server is > occasionally assigned to the wrong one, then you might get a different > declaration. There are many other possibilities. > > > John > > -- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/0e69cfd0-d7c6-4f9a-97ee-74ce59660ec8%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-users/0e69cfd0-d7c6-4f9a-97ee-74ce59660ec8%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 tvaug...@onyxpoint.com -- This account not approved for unencrypted proprietary information -- -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CANs%2BFoWeUK-q2pRj2KRKTptiuUPDsDdN1r%3DvYp-YfF2m-ihE2A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.