Andriy Yurchuk
2013-Feb-03 18:26 UTC
[Puppet Users] Another "function does not return a value" problem
Here''s the function: module Puppet::Parser::Functions newfunction(:fact_to_array, :type => :rvalue) do |args| args[0].split('','') end end Here''s the class I''m trying to use it in: class oms::all_config { file { ''/var/lib/oms/config'': source => ''puppet:///deployment/deployment'', recurse => true, purge => true, force => true, ignore => fact_to_array(''DIR_1,DIR_2,DIR_3''), require => Class[''oms::oms_directory''], } } Getting the following error when trying to run puppet agent --test on a remote agent: Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Function ''fact_to_array'' does not return a value at /etc/puppet/modules/oms/manifests/init.pp:13 on node oms-2787 I''m out of ideas as to why is it not working. Will appreciate any help on this. Thanks ahead -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Andriy Yurchuk
2013-Feb-03 20:28 UTC
[Puppet Users] Re: Another "function does not return a value" problem
For some unknown reason it works after enabling PuppetDB. On Sunday, February 3, 2013 8:26:18 PM UTC+2, Andriy Yurchuk wrote:> > Here''s the function: > > module Puppet::Parser::Functions > newfunction(:fact_to_array, :type => :rvalue) do |args| > args[0].split('','') > end > end > > Here''s the class I''m trying to use it in: > > class oms::all_config { > file { ''/var/lib/oms/config'': > source => ''puppet:///deployment/deployment'', > recurse => true, > purge => true, > force => true, > ignore => fact_to_array(''DIR_1,DIR_2,DIR_3''), > require => Class[''oms::oms_directory''], > } > } > > Getting the following error when trying to run puppet agent --test on a > remote agent: > > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: > Function ''fact_to_array'' does not return a value at > /etc/puppet/modules/oms/manifests/init.pp:13 on node oms-2787 > > I''m out of ideas as to why is it not working. Will appreciate any help on > this. > Thanks ahead >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
R.I.Pienaar
2013-Feb-03 20:32 UTC
Re: [Puppet Users] Re: Another "function does not return a value" problem
----- Original Message -----> From: "Andriy Yurchuk" <ayurch00k@gmail.com> > To: puppet-users@googlegroups.com > Sent: Sunday, February 3, 2013 9:28:58 PM > Subject: [Puppet Users] Re: Another "function does not return a value" problem > > For some unknown reason it works after enabling PuppetDB.I guess you restarted the master while doing this? you have to restart it each time you change a function -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Andriy Yurchuk
2013-Feb-04 11:54 UTC
Re: [Puppet Users] Re: Another "function does not return a value" problem
Yes, that was the reason perhaps. Thanks. On Sunday, February 3, 2013 10:32:32 PM UTC+2, R.I. Pienaar wrote:> > > > ----- Original Message ----- > > From: "Andriy Yurchuk" <ayur...@gmail.com <javascript:>> > > To: puppet...@googlegroups.com <javascript:> > > Sent: Sunday, February 3, 2013 9:28:58 PM > > Subject: [Puppet Users] Re: Another "function does not return a value" > problem > > > > For some unknown reason it works after enabling PuppetDB. > > I guess you restarted the master while doing this? > > you have to restart it each time you change a function >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Apparently Analagous Threads
- [Bug 934] Traverse-only directories (e.g. chmod 110) break the cd command in sftp
- [Bug 934] Traverse-only directories (e.g. chmod 110) break the cd command in sftp
- Specifying multple nodes with mcollective-puppet-agent Host Filters
- How file store when using Btrfs on multi-devices? What happen when a device fail?
- CentOS7 buggy freeradius