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
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.