Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I just installed puppet 3 (3.0.0-0.1rc3puppetlabs1) on a 32bit Ubuntu 12.04 'server' VM. I used the packages for the install.

I then copied over my existing modules and manifests from my production 2.7.x puppet master, and also my hiera.yaml and hieradata/*.

When I run puppet agent --test I get the following:

Error: Puppet::Parser::AST::Resource failed with error NoMethodError: undefined method `empty_answer' for Hiera::Backend:Module at /etc/puppet/environments/test/manifests/nodes/puppet_nodes.pp:47 on node ll-puppet-master-vm

The line in question is:

  class { 'basenode':
    is_puppet_master => true;
  }

Basenode is:

class basenode (
  $is_puppet_master = false,
  $apt_host = 'repo.domain.com'
  ) {
...
}

For the module, hiera is not explicitly used.

Also,

root@ll-puppet-master-vm:/usr/lib/ruby/1.8/puppet/parser/functions# ls hiera*
hiera_array.rb  hiera_hash.rb  hiera_include.rb  hiera.rb

I am either missing a dependency or config file, but I cannot figure out what at this point.

My hiera.yaml is:

---
:hierarchy:
#  - %{node_id}
  - common
:backends:
  - yaml
  - puppet
:yaml:
  :datadir: '/etc/puppet/hieradata'

My puppet.conf:

[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
report=true
server=ll-puppet-master-vm
certname=ll-puppet-master-vm
pluginsync=true
archive_files = true
listen=true

[agent]
environment=test

[master]
facts_terminus = yaml
environment=test
manifest=/etc/puppet/environments/test/manifests/site.pp
modulepath=/etc/puppet/environments/test/modules:/etc/puppet/modules
ssl_client_header=SSL_CLIENT_S_DN
ssl_client_verify_header=SSL_CLIENT_VERIFY
storeconfig=true
dbadapter=mysql
dbuser = XXXXX
dbpassword = XXXXX
dbconnections = 75
reports = store
share|improve this question
    
You might want to check that you also copied over the other /etc/puppet/*.conf files like fileserver.conf, namespaceauth.conf etc. I doubt that'll be the root cause here, but I have run into problems with forgetting about those files. –  pwan Jul 29 '12 at 18:12

1 Answer 1

It turns out that it is actually caused by a bug in some versions of hiera-puppet.

Will have to copy hiera_puppet.rb the hiera-puppet/lib directory or wait for a new RC to be released, or downgrade to one of the older, unaffected RCs.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.