3.6, file resources, and warnings

31 views
Skip to first unread message

Tristan Smith

unread,
May 15, 2014, 6:55:29 PM5/15/14
to puppet...@googlegroups.com
So I'm testing out puppet 3.6 with our existing environment and in general i'm pleased.

There's one oddity that I'm tripping on and I'm not sure how to address it.  We have a number of places where we leverage the 'file' resource with an array of sources - using fileservers to pick the first match of a file for a host, for an operating system, or a fallthrough file, like, say:


    file { "$sudoersd/005_$hostname":
          require => File[$sudoersd],
          ensure => "file",
          owner => root,
          group => 0,
          mode => "0440",
          source => ["puppet:///modules/sudo/etc/sudoers.hosts/$hostname",
                   "puppet:///modules/sudo/etc/sudoers.hosts/no_unique_entries"]
        }


In previous versions, this has worked fine - and it still _works_ today. 

However, I'm seeing warning messages regarding the hostname entry, the one that fails. That seems excessive when the resource doesn't fail or even do something improper.

My question then: Should I 

 a) consider another idiom for these needs?

Or

 b) take advantage of the new log_level directive (thank you, by the way) and set log_level=err and not worry about warnings except when debugging failures?


--Triss

Kylo Ginsberg

unread,
May 17, 2014, 7:20:50 PM5/17/14
to puppet...@googlegroups.com
On Thu, May 15, 2014 at 3:55 PM, Tristan Smith <tr...@dreamlibrarian.com> wrote:
So I'm testing out puppet 3.6 with our existing environment and in general i'm pleased.

There's one oddity that I'm tripping on and I'm not sure how to address it.  We have a number of places where we leverage the 'file' resource with an array of sources - using fileservers to pick the first match of a file for a host, for an operating system, or a fallthrough file, like, say:


    file { "$sudoersd/005_$hostname":
          require => File[$sudoersd],
          ensure => "file",
          owner => root,
          group => 0,
          mode => "0440",
          source => ["puppet:///modules/sudo/etc/sudoers.hosts/$hostname",
                   "puppet:///modules/sudo/etc/sudoers.hosts/no_unique_entries"]
        }


In previous versions, this has worked fine - and it still _works_ today. 

However, I'm seeing warning messages regarding the hostname entry, the one that fails. That seems excessive when the resource doesn't fail or even do something improper.

This sounds like https://tickets.puppetlabs.com/browse/PUP-2584, which should be fixed in 3.6.1. Those warning messages definitely make for a lot of log spam!

Glad 3.6 is looking good for you in general.

Kylo

My question then: Should I 

 a) consider another idiom for these needs?

Or

 b) take advantage of the new log_level directive (thank you, by the way) and set log_level=err and not worry about warnings except when debugging failures?


--Triss

--
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/70070de5-ea62-4406-94c6-12632e3e0c7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Kylo Ginsberg

Join us at PuppetConf 2014September 23-24 in San Francisco - http://puppetconf.com 
Register by May 30th to take advantage of the Early Adopter discount save $349!

Reply all
Reply to author
Forward
0 new messages