Hi All, sorry if this was discussed before but I didn''t find any solution for my problem. Test site.pp consists of 1 line: file { "/tmp/bar": audit => content } exec { ''/usr/bin/true'': refreshonly => true, subscribe => File[''/tmp/bar''] } and it produces this error every time: err: /Stage[main]//Node[localhost]/File[/tmp/bar]: Could not evaluate: Could not retrieve content for {md5}0d436949d23842605ecef4164ec54381 from filebucket: File not found at /etc/puppet/manifests/site.pp:1 notice: /Stage[main]//Node[localhost]/Exec[/usr/bin/true]: Dependency File[/tmp/bar] has failures: true warning: /Stage[main]//Node[localhost]/Exec[/usr/bin/true]: Skipping because of failed dependencies notice: Finished catalog run in 0.06 seconds I''m running latest versions of software: puppet-2.6.3-0.3.rc3.el5 and CentOS release 5.5 Does anyone have any thought what I''m doing wrong? Thanks in advance for any reply. -- 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.
On Fri, 2010-12-03 at 06:13 +0200, Paul Johnson wrote:> Hi All, > > sorry if this was discussed before but I didn''t find any solution for > my problem. > > Test site.pp consists of 1 line: > > file { "/tmp/bar": audit => content } exec { ''/usr/bin/true'': > refreshonly => true, subscribe => File[''/tmp/bar''] } > > and it produces this error every time: > > err: /Stage[main]//Node[localhost]/File[/tmp/bar]: Could not evaluate: > Could not retrieve content for {md5}0d436949d23842605ecef4164ec54381 > from filebucket: File not found at /etc/puppet/manifests/site.pp:1 > notice: /Stage[main]//Node[localhost]/Exec[/usr/bin/true]: Dependency > File[/tmp/bar] has failures: true > warning: /Stage[main]//Node[localhost]/Exec[/usr/bin/true]: Skipping > because of failed dependencies > notice: Finished catalog run in 0.06 seconds > > I''m running latest versions of software: puppet-2.6.3-0.3.rc3.el5 and > CentOS release 5.5 > > Does anyone have any thought what I''m doing wrong? > > Thanks in advance for any reply.Have you tried running puppet --parseonly against the manifest to see what it comes back with? Also, I''d recommend adding an ''ensure => file'' to the File[] stanza to make sure the file is created if it doesn''t exist - it looks like it''s trying to find the file and failing. M. -- 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.
On Fri, 2010-12-03 at 06:13 +0200, Paul Johnson wrote:> Hi All, > > sorry if this was discussed before but I didn''t find any solution for > my problem. > > Test site.pp consists of 1 line: > > file { "/tmp/bar": audit => content } exec { ''/usr/bin/true'': > refreshonly => true, subscribe => File[''/tmp/bar''] } > > and it produces this error every time: > > err: /Stage[main]//Node[localhost]/File[/tmp/bar]: Could not evaluate: > Could not retrieve content for {md5}0d436949d23842605ecef4164ec54381 > from filebucket: File not found at /etc/puppet/manifests/site.pp:1 > notice: /Stage[main]//Node[localhost]/Exec[/usr/bin/true]: Dependency > File[/tmp/bar] has failures: true > warning: /Stage[main]//Node[localhost]/Exec[/usr/bin/true]: Skipping > because of failed dependencies > notice: Finished catalog run in 0.06 seconds > > I''m running latest versions of software: puppet-2.6.3-0.3.rc3.el5 and > CentOS release 5.5 > > Does anyone have any thought what I''m doing wrong? > > Thanks in advance for any reply.Have you tried running puppet --parseonly against the manifest to see what it comes back with? Also, I''d recommend adding an ''ensure => file'' to the File[] stanza to make sure the file is created if it doesn''t exist - it looks like it''s trying to find the file and failing. M. -- 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.
On Dec 2, 10:13 pm, Paul Johnson <gentoo.ser...@gmail.com> wrote:> file { "/tmp/bar": audit => content } exec { ''/usr/bin/true'': > refreshonly => true, subscribe => File[''/tmp/bar''] } > > and it produces this error every time: > > err: /Stage[main]//Node[localhost]/File[/tmp/bar]: Could not evaluate: > Could not retrieve content for {md5}0d436949d23842605ecef4164ec54381 > from filebucket: File not found at /etc/puppet/manifests/site.pp:1 > notice: /Stage[main]//Node[localhost]/Exec[/usr/bin/true]: Dependency > File[/tmp/bar] has failures: true > warning: /Stage[main]//Node[localhost]/Exec[/usr/bin/true]: Skipping > because of failed dependencies > notice: Finished catalog run in 0.06 secondsThe error message appears to indicate that the problem is absence of file /tmp/bar on the client. The docs are not clear about what happens when you try to audit properties of a resource that does not exist, but simple failure seems a reasonable alternative to me. You could try adding ensure => "present" to your file resource. With no other additional properties, this should cause Puppet to create / tmp/bar as an empty file if it did not previously exist. I would account it a bug if Puppet continued to fail in that case. If your idea is that file /tmp/bar should be optional, then you''re probably out of luck. You could file a feature request for support of that case, but I cannot predict how that specific request would be received. There are reasonable arguments both for and against it. Best, John -- 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.
sorry, forgot to mention that the target file (/tmp/bar) exists and it shouldn''t be optional. I tried adding ''ensure => file'' as you guys suggested but without luck, it still produces the same error. As to reporting this as a bug, there is an official bug (http://projects.puppetlabs.com/issues/5065), but apparently it was considered as a "documentation bug" and Luke said this construction should work ok: --------------- According to Luke: It is supposed to work that way, kind of - this behaviour changed recently and the docs apparently haven''t been updated. The correct way to do this is now: file { "/tmp/bar": audit => content } exec { ''/usr/bin/true'': refreshonly => true, subscribe => File[''/tmp/bar''] } So this is a documentation issue. --------------- But it doesn''t work for me, that''s why I''m asking if it is only me facing this error due to some reasons or it is not a documentation bug and needs to be fixed. Unfortunately there was no reply to this bug for more than a month and IDK how longer it''ll take to review this bug if it really exists (if it''s not my configuration problem). Could anyone try this construction on your end and see if it produces the same error? Thanks in advance. 2010/12/3 jcbollinger <John.Bollinger@stjude.org>:> > > On Dec 2, 10:13 pm, Paul Johnson <gentoo.ser...@gmail.com> wrote: >> file { "/tmp/bar": audit => content } exec { ''/usr/bin/true'': >> refreshonly => true, subscribe => File[''/tmp/bar''] } >> >> and it produces this error every time: >> >> err: /Stage[main]//Node[localhost]/File[/tmp/bar]: Could not evaluate: >> Could not retrieve content for {md5}0d436949d23842605ecef4164ec54381 >> from filebucket: File not found at /etc/puppet/manifests/site.pp:1 >> notice: /Stage[main]//Node[localhost]/Exec[/usr/bin/true]: Dependency >> File[/tmp/bar] has failures: true >> warning: /Stage[main]//Node[localhost]/Exec[/usr/bin/true]: Skipping >> because of failed dependencies >> notice: Finished catalog run in 0.06 seconds > > The error message appears to indicate that the problem is absence of > file /tmp/bar on the client. The docs are not clear about what > happens when you try to audit properties of a resource that does not > exist, but simple failure seems a reasonable alternative to me. > > You could try adding ensure => "present" to your file resource. With > no other additional properties, this should cause Puppet to create / > tmp/bar as an empty file if it did not previously exist. I would > account it a bug if Puppet continued to fail in that case. > > If your idea is that file /tmp/bar should be optional, then you''re > probably out of luck. You could file a feature request for support of > that case, but I cannot predict how that specific request would be > received. There are reasonable arguments both for and against it. > > Best, > > John > > -- > 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.
On Dec 5, 3:19 am, Paul Johnson <gentoo.ser...@gmail.com> wrote:> sorry, forgot to mention that the target file (/tmp/bar) exists and it > shouldn''t be optional. I tried adding ''ensure => file'' as you guys > suggested but without luck, it still produces the same error. As to > reporting this as a bug, there is an official bug > (http://projects.puppetlabs.com/issues/5065),That''s helpful, thanks; I wasn''t aware there was an existing ticket on this topic.> but apparently it was > considered as a "documentation bug" and Luke said this construction > should work ok: > > --------------- > According to Luke: > > It is supposed to work that way, kind of - this behaviour changed > recently and the docs apparently haven''t been updated. The correct way > to do this is now: file { "/tmp/bar": audit => content } exec { > ''/usr/bin/true'': refreshonly => true, subscribe => File[''/tmp/bar''] } > So this is a documentation issue. > --------------- > But it doesn''t work for me, that''s why I''m asking if it is only me > facing this error due to some reasons or it is not a documentation bug > and needs to be fixed. Unfortunately there was no reply to this bug > for more than a month and IDK how longer it''ll take to review this bug > if it really exists (if it''s not my configuration problem). Could > anyone try this construction on your end and see if it produces the > same error? Thanks in advance.I am not running 2.6, so I cannot test this for you. I observe, however, that the last comment on the ticket reports that with Puppet 2.6.3-rc2, the error message you report does not appear, but the exec still doesn''t run. I suspect that means there is indeed an outstanding bug. I recommend you file a new ticket to report that the new behavior Luke described in ticket #5065 is not working. You should call out the fact that the error message that was reported to have disappeared in 2.6.3-rc2 is back in 2.6.3-rc3; if that checks out then it may help narrow down the problem. Alternatively, if you can find and update a ticket describing the actual behavior change Luke described then that might be better, but I didn''t have any luck finding such a ticket. Good Luck, John -- 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.
Thanks for your comment, I posted a new bug and will wait for a reply from guys. 2010/12/6 jcbollinger <John.Bollinger@stjude.org>:> > On Dec 5, 3:19 am, Paul Johnson <gentoo.ser...@gmail.com> wrote: >> sorry, forgot to mention that the target file (/tmp/bar) exists and it >> shouldn''t be optional. I tried adding ''ensure => file'' as you guys >> suggested but without luck, it still produces the same error. As to >> reporting this as a bug, there is an official bug >> (http://projects.puppetlabs.com/issues/5065), > > That''s helpful, thanks; I wasn''t aware there was an existing ticket on > this topic. > >> but apparently it was >> considered as a "documentation bug" and Luke said this construction >> should work ok: >> >> --------------- >> According to Luke: >> >> It is supposed to work that way, kind of - this behaviour changed >> recently and the docs apparently haven''t been updated. The correct way >> to do this is now: file { "/tmp/bar": audit => content } exec { >> ''/usr/bin/true'': refreshonly => true, subscribe => File[''/tmp/bar''] } >> So this is a documentation issue. >> --------------- >> But it doesn''t work for me, that''s why I''m asking if it is only me >> facing this error due to some reasons or it is not a documentation bug >> and needs to be fixed. Unfortunately there was no reply to this bug >> for more than a month and IDK how longer it''ll take to review this bug >> if it really exists (if it''s not my configuration problem). Could >> anyone try this construction on your end and see if it produces the >> same error? Thanks in advance. > > I am not running 2.6, so I cannot test this for you. I observe, > however, that the last comment on the ticket reports that with Puppet > 2.6.3-rc2, the error message you report does not appear, but the exec > still doesn''t run. I suspect that means there is indeed an > outstanding bug. > > I recommend you file a new ticket to report that the new behavior Luke > described in ticket #5065 is not working. You should call out the > fact that the error message that was reported to have disappeared in > 2.6.3-rc2 is back in 2.6.3-rc3; if that checks out then it may help > narrow down the problem. Alternatively, if you can find and update a > ticket describing the actual behavior change Luke described then that > might be better, but I didn''t have any luck finding such a ticket. > > Good Luck, > > John > > -- > 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.