Created
June 19, 2012 07:36
-
-
Save zipkid/2952822 to your computer and use it in GitHub Desktop.
Hiera lookup issue...? Why does Hiera suddenly switch the lookup from the module name to the define name...?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hiera-1.0.0-0.1rc3.el6.noarch | |
hiera-puppet-1.0.0-0.1rc1.el6.noarch | |
puppet-server-3.0.0-0.1rc3.el6.noarch | |
puppet-3.0.0-0.1rc3.el6.noarch | |
[root@pm3 ~]# puppet agent -t --server pm3 | |
Info: Retrieving plugin | |
Info: Loading facts in /etc/puppet-modules/puppet/lib/facter/facter_dot_d.rb | |
Info: Loading facts in /etc/puppet-modules/puppet/lib/facter/puppet_vardir.rb | |
Info: Loading facts in /etc/puppet-modules/puppet/lib/facter/root_home.rb | |
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb | |
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb | |
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb | |
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find data item test_data in any Hiera data file and no default supplied at /etc/puppet-modules/test/manifests/something.pp:6 on node pm3.lan.super-visions.com | |
Warning: Not using cache on failed catalog | |
Error: Could not retrieve catalog; skipping run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class test::data { | |
$test_data = 'Some Usefull/less data' | |
$test_hash = { testing => { param1 => 'value1' } } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
:hierarchy: | |
- 1_Nodes/%{fqdn} | |
- 2_Domain/%{domain} | |
- 3_Perimeter/%{perimeter}/%{datacenter} | |
- 3_Perimeter/%{perimeter} | |
- 4_DC/%{datacenter} | |
- 5_OS/%{operatingsystem} | |
- 6_RT/%{real_time} | |
- 7_Environment/%{environment} | |
- common | |
:backends: | |
- yaml | |
- puppet | |
:yaml: | |
:datadir: '/etc/puppet/hieradata' | |
:puppet: | |
:datasource: data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class test { | |
$hash = hiera('test_hash') | |
create_resources( test::something, $hash ) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Debug: No plugins found in subpath '/etc/puppet-modules/apache/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/clsloader/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/cron/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/firewall/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/groundwork/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/installsource/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/java/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/linux/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/motd/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/ntp/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/package/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/puppet_dashboard/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/puppetbootstrap/lib' (file / directory does not exist) | |
Debug: No plugins found; path not specified | |
Debug: No plugins found in subpath '/etc/puppet-modules/redmine/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/resolv/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/ruby/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/selinux/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/sudo/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/test/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/tomcat/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/tool/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/user/lib' (file / directory does not exist) | |
Debug: No plugins found in subpath '/etc/puppet-modules/yumrepo/lib' (file / directory does not exist) | |
Debug: importing '/etc/puppet/manifests/nodes/da1.pp' in environment production | |
Debug: importing '/etc/puppet/manifests/nodes/pm1.pp' in environment production | |
Debug: importing '/etc/puppet/manifests/nodes/pm3.pp' in environment production | |
Debug: importing '/etc/puppet-modules/test/manifests/init.pp' in environment production | |
Debug: Automatically imported test from test into production | |
Debug: hiera(): Looking up test_hash in YAML backend | |
Debug: hiera(): Looking for data source 1_Nodes/pm3.lan.super-visions.com | |
Debug: hiera(): Looking for data source 2_Domain/lan.super-visions.com | |
Debug: hiera(): Cannot find datafile /etc/puppet/hieradata/2_Domain/lan.super-visions.com.yaml, skipping | |
Debug: hiera(): Looking for data source 5_OS/CentOS | |
Debug: hiera(): Looking for data source 7_Environment/production | |
Debug: hiera(): Looking for data source common | |
Debug: hiera(): Looking up test_hash in Puppet backend | |
Debug: hiera(): Looking for data in data::1_Nodes/pm3.lan.super-visions.com | |
Debug: importing '/etc/puppet-modules/test/manifests/data.pp' in environment production | |
Debug: hiera(): Looking for data in data::2_Domain/lan.super-visions.com | |
Debug: hiera(): Looking for data in data::3_Perimeter// | |
Debug: hiera(): Looking for data in data::3_Perimeter/ | |
Debug: hiera(): Looking for data in data::4_DC/ | |
Debug: hiera(): Looking for data in data::5_OS/CentOS | |
Debug: hiera(): Looking for data in data::6_RT/ | |
Debug: hiera(): Looking for data in data::7_Environment/production | |
Debug: hiera(): Looking for data in data::common | |
Debug: hiera(): Looking for data in test::data | |
Debug: hiera(): Found data in class test::data | |
Debug: importing '/etc/puppet-modules/test/manifests/something.pp' in environment production | |
Debug: Automatically imported test::something from test/something into production | |
Scope(Test::Something[testing]): instance ----- testing -- value1 | |
Debug: hiera(): Looking up test_data in YAML backend | |
Debug: hiera(): Looking for data source 1_Nodes/pm3.lan.super-visions.com | |
Debug: hiera(): Looking for data source 2_Domain/lan.super-visions.com | |
Debug: hiera(): Cannot find datafile /etc/puppet/hieradata/2_Domain/lan.super-visions.com.yaml, skipping | |
Debug: hiera(): Looking for data source 5_OS/CentOS | |
Debug: hiera(): Looking for data source 7_Environment/production | |
Debug: hiera(): Looking for data source common | |
Debug: hiera(): Looking up test_data in Puppet backend | |
Debug: hiera(): Looking for data in data::1_Nodes/pm3.lan.super-visions.com | |
Debug: hiera(): Looking for data in data::2_Domain/lan.super-visions.com | |
Debug: hiera(): Looking for data in data::3_Perimeter// | |
Debug: hiera(): Looking for data in data::3_Perimeter/ | |
Debug: hiera(): Looking for data in data::4_DC/ | |
Debug: hiera(): Looking for data in data::5_OS/CentOS | |
Debug: hiera(): Looking for data in data::6_RT/ | |
Debug: hiera(): Looking for data in data::7_Environment/production | |
Debug: hiera(): Looking for data in data::common | |
Debug: hiera(): Looking for data in testing::data | |
Error: Could not find data item test_data in any Hiera data file and no default supplied at /etc/puppet-modules/test/manifests/something.pp:6 on node pm3.lan.super-visions.com | |
Error: Could not find data item test_data in any Hiera data file and no default supplied at /etc/puppet-modules/test/manifests/something.pp:6 on node pm3.lan.super-visions.com | |
Error: Could not find data item test_data in any Hiera data file and no default supplied at /etc/puppet-modules/test/manifests/something.pp:6 on node pm3.lan.super-visions.com | |
Debug: Received report to process from pm3.lan.super-visions.com | |
Debug: Processing report from pm3.lan.super-visions.com with processor Puppet::Reports::Store | |
Debug: Processing report from pm3.lan.super-visions.com with processor Puppet::Reports::Http | |
Error: Report processor failed: getaddrinfo: Name or service not known |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define test::something( $param1 ) { | |
notice( "instance ----- $name -- $param1") | |
$test_data = hiera('test_data') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment