david.garvey@gmail.com
2012-Aug-01 15:56 UTC
[Puppet Users] err: Invalid parameter hostgroup at line 370 on node
Hello, I can''t wrap my head around what is causing this error. After rebooting the box I get this error. If I remove the $hostgroup parameter is errors at $product_domain and down the line. What is going wrong here? I have facters defined for nagios server. I am testing this where nagios server (puppet client) is currently on the puppetmaster. The error prevents me from updating my nagios configs. facter | egrep "product_info|product_domain" product_domain => nagios_server product_info => nagios_server puppet agent --test --verbose err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter product_domain at line 370 on node nagios_node. warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run class nagios-server { File <<| tag == ''nagios'' |>> define host($ip = $::fqdn, $short_alias = $::fqdn, $hostgroup $::product_info, $product_domain = $::product_domain) { case $product_info { /SomeProduct/: { $nagios_cfgdir = "/usr/local/nagios/etc/objects/ctf/hosts" @@file { "$nagios_cfgdir/${name}.cfg": ignore => ".svn", ensure => present, content => template( "nagios/host.cfg" ), mode => 644, owner => nagios, group => nagios, tag => ''nagios'', notify => Service[nagios], } } Thanks, David Garvey -- 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.
david.garvey@gmail.com
2012-Aug-01 17:22 UTC
[Puppet Users] Re: err: Invalid parameter hostgroup at line 370 on node
When I comment the line out I still get a related error: #puppet agent --test --verbose err: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter short_alias at line 370 on node nagios warning: Not using cache on failed catalog err: Could not retrieve catalog; skipping run #grep short_alias /etc/puppet/modules/nagios/manifests/init.pp #define host($ip = $::fqdn, $short_alias = $::fqdn, $product_domain $::product_domain) { # On Wed, Aug 1, 2012 at 8:56 AM, david.garvey@gmail.com < david.garvey@gmail.com> wrote:> Hello, > > I can''t wrap my head around what is causing this error. After rebooting > the box I get this error. If I remove the $hostgroup parameter it errors at > $product_domain and down the line. What is going wrong here? I have facters > defined for nagios server. > I am testing this where nagios server (puppet client) is currently on the > puppetmaster. The error prevents me from updating my nagios configs. > > facter | egrep "product_info|product_domain" > product_domain => nagios_server > product_info => nagios_server > > > puppet agent --test --verbose > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Invalid parameter product_domain at line 370 on node nagios_node. > warning: Not using cache on failed catalog > err: Could not retrieve catalog; skipping run > > > class nagios-server { > > File <<| tag == ''nagios'' |>> > > define host($ip = $::fqdn, $short_alias = $::fqdn, $hostgroup > $::product_info, $product_domain = $::product_domain) { > case $product_info { > /SomeProduct/: { > $nagios_cfgdir = "/usr/local/nagios/etc/objects/ctf/hosts" > @@file { > "$nagios_cfgdir/${name}.cfg": > ignore => ".svn", > ensure => present, > content => template( "nagios/host.cfg" ), > mode => 644, > owner => nagios, > group => nagios, > tag => ''nagios'', > notify => Service[nagios], > } > } > > > > > > Thanks, > David Garvey >-- David Garvey -- 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.
Calvin Walton
2012-Aug-01 18:01 UTC
Re: [Puppet Users] err: Invalid parameter hostgroup at line 370 on node
On Wed, 2012-08-01 at 08:56 -0700, david.garvey@gmail.com wrote:> Hello, > > I can''t wrap my head around what is causing this error. After rebooting the > box I get this error. If I remove the $hostgroup parameter is errors at > $product_domain and down the line. What is going wrong here? I have facters > defined for nagios server. > I am testing this where nagios server (puppet client) is currently on the > puppetmaster. The error prevents me from updating my nagios configs.> puppet agent --test --verbose > err: Could not retrieve catalog from remote server: Error 400 on SERVER: > Invalid parameter product_domain at line 370 on node nagios_node.> define host($ip = $::fqdn, $short_alias = $::fqdn, $hostgroup > $::product_info, $product_domain = $::product_domain) { > case $product_info {Hmm. I''m actually wondering if the reason for this is the reference to the facts in the default values for the parameters. I was under the impression that *should* work, but I''m not totally familiar with the code in question. Can you say which versions of Puppet you''re running on the server and client? As a workaround, you might try something like this: define host($ip = ''UNSET'') { if $ip == ''UNSET'' { $ip = $::fqdn } ... } -- Calvin Walton <calvin.walton@kepstin.ca> -- 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.