Juan Sierra Pons
2012-Aug-06 19:01 UTC
[Puppet Users] Could not evaluate: Could not retrieve information from environment production source(s) for one module, for other is ok
Hi, I have been fighting this issue without success for several days. I am sure some of you have dealt with something similar: I have 2 manifest one for vim which works like a charm : class vim { if $operatingsystem == "Debian" { package {"vim": ensure => present, } package {''vim-puppet'': ensure => present, require => Package["vim"], } } file { "/etc/vim/vimrc": owner => "root", group => "root", mode => 0644, source =>"puppet://$puppetserver/modules/vim/etc/vim/vimrc", require => Package["vim"], } } The source file is downloaded ok Aug 6 20:49:55 virtualito puppet-agent[26967]: (/Stage[main]/Vim/File[/etc/vim/vimrc]/ensure) defined content as ''{md5}b98e8ce84974ad114ec0e12b8b97fa1f'' BUT I have a similar manifest for ntp: class ntp { if $is_virtual == ''false'' { package { ''ntp'': ensure => present, } service { ''ntp'': ensure => ''running'', enable => ''true'', hasrestart => ''true'', require => Package[''ntp''] } file { "/etc/ntpd.conf": owner => "root", group => "root", mode => 0644, require => Package["ntp"], source => "puppet://$puppetserver/modules/ntp/files/etc/ntp.conf", } } if $is_virtual == ''true'' { package { ''ntp'': ensure => purged, } } } In this case the source file is not downloaded and the logs show the following output: (/Stage[main]/Ntp/File[/etc/ntpd.conf]) Could not evaluate: Could not retrieve information from environment production source(s) puppet:///modules/ntp/files/etc/ntp.conf at /etc/puppet/modules/ntp/manifests/init.pp:19 I have already checked that puppet user can get to the proper file so is not a issue of FS permission. Any idea? Best regards -------------------------------------------------------------------------------------- Juan Sierra Pons juan@elsotanillo.net Linux User Registered: #257202 http://www.elsotanillo.net GPG key = 0xA110F4FE Key Fingerprint = DF53 7415 0936 244E 9B00 6E66 E934 3406 A110 F4FE -------------------------------------------------------------------------------------- -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Tim Mooney
2012-Aug-06 20:45 UTC
Re: [Puppet Users] Could not evaluate: Could not retrieve information from environment production source(s) for one module, for other is ok
In regard to: [Puppet Users] Could not evaluate: Could not retrieve...:> class ntp { > if $is_virtual == ''false'' { > package { ''ntp'': > ensure => present, > } > service { ''ntp'': > ensure => ''running'', > enable => ''true'', > hasrestart => ''true'', > require => Package[''ntp''] > } > file { "/etc/ntpd.conf": > owner => "root", > group => "root", > mode => 0644, > require => Package["ntp"], > source => > "puppet://$puppetserver/modules/ntp/files/etc/ntp.conf", > } > } > if $is_virtual == ''true'' { > package { ''ntp'': > ensure => purged, > } > } > }Your indenting is a little strange, but I would start by using notice/notify/fail or whatever you prefer to determine what is_virtual actually is set to. There was a thread about quoting and true/false a few months ago, search the archives for that. I can''t remember if the style guide was updated with recommendations regarding quoting true/false, but that would also be a place to look. Try using yes/no (as strings) and checking for that in your class. You may also want to run puppet-lint on your manifests, it''s not perfect but it will help catch a number of issues. Tim -- Tim Mooney Tim.Mooney@ndsu.edu Enterprise Computing & Infrastructure 701-231-1076 (Voice) Room 242-J6, IACC Building 701-231-8541 (Fax) North Dakota State University, Fargo, ND 58105-5164 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
jenrzzz
2012-Aug-06 22:25 UTC
[Puppet Users] Re: Could not evaluate: Could not retrieve information from environment production source(s) for one module, for other is ok
Your source path should be "puppet://$puppetserver/**modules/ntp/etc/ntp.**conf". Leave out the ''files'' part. -- Jenner On Monday, August 6, 2012 12:01:20 PM UTC-7, Juan Sierra Pons wrote:> > Hi, > > I have been fighting this issue without success for several days. I am > sure some of you have dealt with something similar: > > I have 2 manifest one for vim which works like a charm : > > class vim { > if $operatingsystem == "Debian" { > package {"vim": > ensure => present, > } > package {''vim-puppet'': > ensure => present, > require => Package["vim"], > } > } > file { "/etc/vim/vimrc": > owner => "root", > group => "root", > mode => 0644, > source > =>"puppet://$puppetserver/modules/vim/etc/vim/vimrc", > require => Package["vim"], > } > } > > The source file is downloaded ok > Aug 6 20:49:55 virtualito puppet-agent[26967]: > (/Stage[main]/Vim/File[/etc/vim/vimrc]/ensure) defined content as > ''{md5}b98e8ce84974ad114ec0e12b8b97fa1f'' > > BUT I have a similar manifest for ntp: > > class ntp { > if $is_virtual == ''false'' { > package { ''ntp'': > ensure => present, > } > service { ''ntp'': > ensure => ''running'', > enable => ''true'', > hasrestart => ''true'', > require => Package[''ntp''] > } > file { "/etc/ntpd.conf": > owner => "root", > group => "root", > mode => 0644, > require => Package["ntp"], > source => > "puppet://$puppetserver/modules/ntp/files/etc/ntp.conf", > } > } > if $is_virtual == ''true'' { > package { ''ntp'': > ensure => purged, > } > } > } > > In this case the source file is not downloaded and the logs show the > following output: > > (/Stage[main]/Ntp/File[/etc/ntpd.conf]) Could not evaluate: Could not > retrieve information from environment production source(s) > puppet:///modules/ntp/files/etc/ntp.conf at > /etc/puppet/modules/ntp/manifests/init.pp:19 > > I have already checked that puppet user can get to the proper file so > is not a issue of FS permission. > > Any idea? > > Best regards > > -------------------------------------------------------------------------------------- > > Juan Sierra Pons juan@elsotanillo.net > Linux User Registered: #257202 http://www.elsotanillo.net > GPG key = 0xA110F4FE > Key Fingerprint = DF53 7415 0936 244E 9B00 6E66 E934 3406 A110 F4FE > -------------------------------------------------------------------------------------- > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/hJqnlHxzo5YJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Josh Cooper
2012-Aug-07 04:21 UTC
Re: [Puppet Users] Re: Could not evaluate: Could not retrieve information from environment production source(s) for one module, for other is ok
On Mon, Aug 6, 2012 at 3:25 PM, jenrzzz <wakekid777@gmail.com> wrote:> > Your source path should be > "puppet://$puppetserver/modules/ntp/etc/ntp.conf". Leave out the ''files'' > part. > > -- Jenner > > On Monday, August 6, 2012 12:01:20 PM UTC-7, Juan Sierra Pons wrote: >> >> Hi, >> >> I have been fighting this issue without success for several days. I am >> sure some of you have dealt with something similar: >> >> I have 2 manifest one for vim which works like a charm : >> >> class vim { >> if $operatingsystem == "Debian" { >> package {"vim": >> ensure => present, >> } >> package {''vim-puppet'': >> ensure => present, >> require => Package["vim"], >> } >> } >> file { "/etc/vim/vimrc": >> owner => "root", >> group => "root", >> mode => 0644, >> source >> =>"puppet://$puppetserver/modules/vim/etc/vim/vimrc", >> require => Package["vim"], >> } >> } >> >> The source file is downloaded ok >> Aug 6 20:49:55 virtualito puppet-agent[26967]: >> (/Stage[main]/Vim/File[/etc/vim/vimrc]/ensure) defined content as >> ''{md5}b98e8ce84974ad114ec0e12b8b97fa1f'' >> >> BUT I have a similar manifest for ntp: >> >> class ntp { >> if $is_virtual == ''false'' { >> package { ''ntp'': >> ensure => present, >> } >> service { ''ntp'': >> ensure => ''running'', >> enable => ''true'', >> hasrestart => ''true'', >> require => Package[''ntp''] >> } >> file { "/etc/ntpd.conf": >> owner => "root", >> group => "root", >> mode => 0644, >> require => Package["ntp"], >> source => >> "puppet://$puppetserver/modules/ntp/files/etc/ntp.conf", >> } >> } >> if $is_virtual == ''true'' { >> package { ''ntp'': >> ensure => purged, >> } >> } >> } >> >> In this case the source file is not downloaded and the logs show the >> following output: >> >> (/Stage[main]/Ntp/File[/etc/ntpd.conf]) Could not evaluate: Could not >> retrieve information from environment production source(s) >> puppet:///modules/ntp/files/etc/ntp.conf at >> /etc/puppet/modules/ntp/manifests/init.pp:19 >> >> I have already checked that puppet user can get to the proper file so >> is not a issue of FS permission. >> >> Any idea? >> >> Best regards >> >> >> -------------------------------------------------------------------------------------- >> Juan Sierra Pons juan@elsotanillo.net >> Linux User Registered: #257202 http://www.elsotanillo.net >> GPG key = 0xA110F4FE >> Key Fingerprint = DF53 7415 0936 244E 9B00 6E66 E934 3406 A110 F4FE >> >> -------------------------------------------------------------------------------------- > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/hJqnlHxzo5YJ. > > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en.Also I highly recommend the file server docs that describe the puppet URL syntax in more detail[1]. For example, the $puppetserver part is not necessary. Josh [1] http://docs.puppetlabs.com/guides/file_serving.html -- Josh Cooper Developer, Puppet Labs -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Juan Sierra Pons
2012-Aug-07 17:22 UTC
Re: [Puppet Users] Re: Could not evaluate: Could not retrieve information from environment production source(s) for one module, for other is ok
Thank you all for point me in the right direction: - The problem was the "file" part include in the path. No it works OK I didn''t pay enough attention to it - http://docs.puppetlabs.com/guides/file_serving.html explains perfectly how it works - puppet-lint is an excellent tool too Best regards -------------------------------------------------------------------------------------- Juan Sierra Pons juan@elsotanillo.net Linux User Registered: #257202 http://www.elsotanillo.net GPG key = 0xA110F4FE Key Fingerprint = DF53 7415 0936 244E 9B00 6E66 E934 3406 A110 F4FE -------------------------------------------------------------------------------------- 2012/8/7 Josh Cooper <josh@puppetlabs.com>:> On Mon, Aug 6, 2012 at 3:25 PM, jenrzzz <wakekid777@gmail.com> wrote: >> >> Your source path should be >> "puppet://$puppetserver/modules/ntp/etc/ntp.conf". Leave out the ''files'' >> part. >> >> -- Jenner >> >> On Monday, August 6, 2012 12:01:20 PM UTC-7, Juan Sierra Pons wrote: >>> >>> Hi, >>> >>> I have been fighting this issue without success for several days. I am >>> sure some of you have dealt with something similar: >>> >>> I have 2 manifest one for vim which works like a charm : >>> >>> class vim { >>> if $operatingsystem == "Debian" { >>> package {"vim": >>> ensure => present, >>> } >>> package {''vim-puppet'': >>> ensure => present, >>> require => Package["vim"], >>> } >>> } >>> file { "/etc/vim/vimrc": >>> owner => "root", >>> group => "root", >>> mode => 0644, >>> source >>> =>"puppet://$puppetserver/modules/vim/etc/vim/vimrc", >>> require => Package["vim"], >>> } >>> } >>> >>> The source file is downloaded ok >>> Aug 6 20:49:55 virtualito puppet-agent[26967]: >>> (/Stage[main]/Vim/File[/etc/vim/vimrc]/ensure) defined content as >>> ''{md5}b98e8ce84974ad114ec0e12b8b97fa1f'' >>> >>> BUT I have a similar manifest for ntp: >>> >>> class ntp { >>> if $is_virtual == ''false'' { >>> package { ''ntp'': >>> ensure => present, >>> } >>> service { ''ntp'': >>> ensure => ''running'', >>> enable => ''true'', >>> hasrestart => ''true'', >>> require => Package[''ntp''] >>> } >>> file { "/etc/ntpd.conf": >>> owner => "root", >>> group => "root", >>> mode => 0644, >>> require => Package["ntp"], >>> source => >>> "puppet://$puppetserver/modules/ntp/files/etc/ntp.conf", >>> } >>> } >>> if $is_virtual == ''true'' { >>> package { ''ntp'': >>> ensure => purged, >>> } >>> } >>> } >>> >>> In this case the source file is not downloaded and the logs show the >>> following output: >>> >>> (/Stage[main]/Ntp/File[/etc/ntpd.conf]) Could not evaluate: Could not >>> retrieve information from environment production source(s) >>> puppet:///modules/ntp/files/etc/ntp.conf at >>> /etc/puppet/modules/ntp/manifests/init.pp:19 >>> >>> I have already checked that puppet user can get to the proper file so >>> is not a issue of FS permission. >>> >>> Any idea? >>> >>> Best regards >>> >>> >>> -------------------------------------------------------------------------------------- >>> Juan Sierra Pons juan@elsotanillo.net >>> Linux User Registered: #257202 http://www.elsotanillo.net >>> GPG key = 0xA110F4FE >>> Key Fingerprint = DF53 7415 0936 244E 9B00 6E66 E934 3406 A110 F4FE >>> >>> -------------------------------------------------------------------------------------- >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/puppet-users/-/hJqnlHxzo5YJ. >> >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-users+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. > > Also I highly recommend the file server docs that describe the puppet > URL syntax in more detail[1]. For example, the $puppetserver part is > not necessary. > > Josh > > [1] http://docs.puppetlabs.com/guides/file_serving.html > > -- > Josh Cooper > Developer, Puppet Labs > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Maybe Matching Threads
- Unresponsive nodes with no pending task in the dashboard
- Unable to configure Puppet-dashboard using opensource package
- facter-1.6.0 incorrectly identifies hardware node as virtual
- testing for truth, are the docs correct?
- .vimrc File Disappeared and Saw vimrc and .viminfo Files in My Home Directory