The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #15117

Error 400 on SERVER: undefined method `<<' for {}:Hash when a resource has both a before => parameter, and -> ordering.

Added by Wolf Noble over 2 years ago. Updated over 1 year ago.

Status:AcceptedStart date:06/19/2012
Priority:NormalDue date:
Assignee:Jeff McCune% Done:

0%

Category:-
Target version:-
Affected Puppet version: Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


Description

Hello, here’s an example:

class syslog::debian::rsyslog { #take advantage of the Anchor pattern Anchor [‘syslog::debian::begin’] –> anchor {‘syslog::debian::rsyslog::begin’:} –> anchor {‘syslog::debian::rsyslog::prune’:} –> anchor {‘syslog::debian::rsyslog::install::begin’:} –> anchor {‘syslog::debian::rsyslog::install::end’:} –> anchor {‘syslog::debian::rsyslog::configure::begin’:} –> anchor {‘syslog::debian::rsyslog::configure::end’:} –> anchor {‘syslog::debian::rsyslog::service::begin’:} –> anchor {‘syslog::debian::rsyslog::service::end’:} –> anchor {‘syslog::debian::rsyslog::end’:} –> Anchor [‘syslog::debian::end’] # resources file { ‘syslog_fact’:

ensure   => 'present',
path     => '/etc/puppetlabs/facter/facts.d/syslog_provider',
content  => 'syslog_provider=rsyslog',
before   => Anchor['syslog::debian::rsyslog::end'],

} –> Anchor[‘syslog::debian::rsyslog::install::begin’] }

which results in:

root@pe-ubuntu:/var/opt/lib/pe-puppet/lib/facter# puppet agent apply —verbose —no-daemonize —trace notice: Starting Puppet client version 2.7.12 (Puppet Enterprise 2.5.1) info: Retrieving plugin info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables.rb info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/dpqlgc.rb info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/dpmem.rb info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/dposmajor.rb info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/dplumsvr.rb info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/dppubip.rb info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/ldapserver.rb info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/portstate.rb info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/dprhnsystem_id.rb info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/ldapclient.rb info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/lumension.rb info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/dpcore.rb info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/hpacucli.rb info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/dpduck.rb sh: Syntax error: Bad fd number /opt/puppet/lib/site_ruby/1.8/puppet/indirector/rest.rb:56:in deserialize' /opt/puppet/lib/site_ruby/1.8/puppet/indirector/rest.rb:120:infind' /opt/puppet/lib/site_ruby/1.8/puppet/indirector/indirection.rb:196:in find' /opt/puppet/lib/site_ruby/1.8/puppet/configurer.rb:240:inretrieve_new_catalog' /opt/puppet/lib/site_ruby/1.8/puppet/util.rb:467:in thinmark' /opt/puppet/lib/ruby/1.8/benchmark.rb:308:inrealtime' /opt/puppet/lib/site_ruby/1.8/puppet/util.rb:466:in thinmark' /opt/puppet/lib/site_ruby/1.8/puppet/configurer.rb:239:inretrieve_new_catalog' /opt/puppet/lib/site_ruby/1.8/puppet/configurer.rb:86:in retrieve_catalog' /opt/puppet/lib/site_ruby/1.8/puppet/configurer.rb:112:inretrieve_and_apply_catalog' /opt/puppet/lib/site_ruby/1.8/puppet/configurer.rb:152:in run' /opt/puppet/lib/site_ruby/1.8/puppet/agent.rb:44:inrun' /opt/puppet/lib/site_ruby/1.8/puppet/agent/locker.rb:21:in lock' /opt/puppet/lib/site_ruby/1.8/puppet/agent.rb:44:inrun' /opt/puppet/lib/ruby/1.8/sync.rb:230:in synchronize' /opt/puppet/lib/site_ruby/1.8/puppet/agent.rb:44:inrun' /opt/puppet/lib/site_ruby/1.8/puppet/agent.rb:108:in with_client' /opt/puppet/lib/site_ruby/1.8/puppet/agent.rb:42:inrun' /opt/puppet/lib/site_ruby/1.8/puppet/application.rb:172:in call' /opt/puppet/lib/site_ruby/1.8/puppet/application.rb:172:incontrolled_run' /opt/puppet/lib/site_ruby/1.8/puppet/agent.rb:40:in run' /opt/puppet/lib/site_ruby/1.8/puppet/agent.rb:83:instart' /opt/puppet/lib/site_ruby/1.8/puppet/external/event-loop/signal-system.rb:95:in call' /opt/puppet/lib/site_ruby/1.8/puppet/external/event-loop/signal-system.rb:95:insignal‘ /opt/puppet/lib/site_ruby/1.8/puppet/external/event-loop/signal-system.rb:95:in each' /opt/puppet/lib/site_ruby/1.8/puppet/external/event-loop/signal-system.rb:95:insignal’ (eval):2:in signal' /opt/puppet/lib/site_ruby/1.8/puppet/external/event-loop/event-loop.rb:317:insound_alarm' /opt/puppet/lib/site_ruby/1.8/puppet/agent.rb:87:in start' /opt/puppet/lib/site_ruby/1.8/puppet/daemon.rb:124:instart' /opt/puppet/lib/site_ruby/1.8/puppet/application/agent.rb:357:in main' /opt/puppet/lib/site_ruby/1.8/puppet/application/agent.rb:312:inrun_command' /opt/puppet/lib/site_ruby/1.8/puppet/application.rb:309:in run' /opt/puppet/lib/site_ruby/1.8/puppet/application.rb:416:inhook' /opt/puppet/lib/site_ruby/1.8/puppet/application.rb:309:in run' /opt/puppet/lib/site_ruby/1.8/puppet/application.rb:407:inexit_on_fail' /opt/puppet/lib/site_ruby/1.8/puppet/application.rb:309:in run' /opt/puppet/lib/site_ruby/1.8/puppet/util/command_line.rb:69:inexecute' /usr/local/bin/puppet:4 err: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `<<‘ for {}:Hash on node pe-ubuntu.wolfspaw.com info: Not using expired catalog for pe-ubuntu.wolfspaw.com from cache; expired at Tue Jun 19 21:00:26 +0000 2012 notice: Using cached catalog err: Could not retrieve catalog; skipping run

the bad fd error seen above is irrelevant. it has to do with a custom fact of mine that’s breaking on ubuntu and I haven’t fixed it yet. I do not believe it has anything to do with the issue here.


Related issues

Duplicates Puppet - Bug #7422: undefined method `<<' for {}:Hash when combining resource... Closed 05/05/2011

History

#1 Updated by eric sorenson over 2 years ago

  • Status changed from Unreviewed to Accepted
  • Assignee set to Jeff McCune

Jeff could you please take a look at this during your goalie week?

#2 Updated by Peter Meier almost 2 years ago

According to #7422 this should be fixed. Please re-open if not the case.

Also available in: Atom PDF