Closed Freeaqingme closed 11 years ago
I was not able to reproduce the error, sorry. I need more details:
Some trivial step to verify:
Here are the steps I did to verify the problem: On the server: git clone --recursive https://github.com/example42/puppet-modules.git modules vi /etc/puppet/manifests/site.pp
node default { class { 'ntp': } }
On the client, a Scientific Linux 6, which is equivalent to Centos/RedHat (after the first certificate sign) here's the output:
[root@test-sl6 ~]# puppetd -t info: Retrieving plugin info: Loading facts in rvm_installed info: Loading facts in concat_basedir info: Loading facts in rvm_installed info: Loading facts in concat_basedir info: Caching catalog for test-sl6.example42.com info: Applying configuration version '1344747881' --- /etc/ntp.conf 2009-07-22 07:37:01.000000000 +0200 +++ /tmp/puppet-file20120812-14394-1afg9xl-0 2012-08-12 09:04:46.579250078 +0200 @@ -1,7 +1,4 @@ -# For more information about this file, see the man pages
-driftfile /var/lib/ntp/drift +# File Managed by Puppet
@@ -19,26 +16,29 @@
-server 0.rhel.pool.ntp.org -server 1.rhel.pool.ntp.org -server 2.rhel.pool.ntp.org +# server 0.pool.ntp.org + +# We synchronise from the following +server pool.ntp.org
-#broadcast 192.168.1.255 autokey # broadcast server + +#broadcast 192.168.1.255 key 42 # broadcast server
-#broadcast 224.0.1.1 autokey # multicast server +#broadcast 224.0.1.1 key 42 # multicast server
-#manycastclient 239.255.254.254 autokey # manycast client +#manycastclient 239.255.254.254 key 42 # manycast client
-#server 127.127.1.0 # local clock
-# Enable public key cryptography. -#crypto +server 127.127.1.0 # local clock +fudge 127.127.1.0 stratum 10
-includefile /etc/ntp/crypto/pw +# Drift file. Put this in a directory which the daemon can write to. +# No symbolic links allowed, either, since the daemon updates the file +# by creating a temporary in the same directory and then rename()'ing +# it to the file. +driftfile /var/lib/ntp/drift
@@ -53,5 +53,3 @@
-# Enable writing of statistics records. -#statistics clockstats cryptostats loopstats peerstats info: FileBucket adding {md5}2ce42df01efc8b1745097faa7b83d9e5 info: /File[ntp.conf]: Filebucketed /etc/ntp.conf to puppet with sum 2ce42df01efc8b1745097faa7b83d9e5 notice: /File[ntp.conf]/content: content changed '{md5}2ce42df01efc8b1745097faa7b83d9e5' to '{md5}af6dd13606a24b9537ac2a205e43df3f' info: /File[ntp.conf]: Scheduling refresh of Service[ntp] notice: /Stage[main]/Ntp/Service[ntp]/ensure: ensure changed 'stopped' to 'running' notice: /Stage[main]/Ntp/Service[ntp]: Triggered 'refresh' from 1 events notice: Finished catalog run in 1.06 seconds
(Note that by default the ntp class provides pool.ntp.org as ntp server)
root@puppetmaster:/etc/puppet/manifests# puppet --version 3.0.0 root@puppetclient:~# puppet --version 3.0.0
root@puppetmaster:/etc/puppet/manifests# cat ../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
server=puppetmaster.vm
[master]
ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = SSL_CLIENT_VERIFY
certname=puppetmaster.vm
root@puppetmaster:/etc/puppet/manifests# cat site.pp
node default { class { 'ntp': } }
On the client: root@puppetclient:~# facter architecture => amd64 augeasversion => 0.10.0 blockdevice_sda_model => VBOX HARDDISK blockdevice_sda_size => 8589934592 blockdevice_sda_vendor => ATA blockdevice_sr0_model => CD-ROM blockdevice_sr0_size => 1073741312 blockdevice_sr0_vendor => VBOX blockdevices => sda,sr0 facterversion => 2.0.0 filesystems => ext2,ext3,ext4 hardwareisa => x86_64 hardwaremodel => x86_64 hostname => puppetclient id => root interfaces => eth0,eth1,lo ipaddress => 192.168.56.11 ipaddress_eth0 => 192.168.56.11 ipaddress_eth1 => 10.0.3.15 ipaddress_lo => 127.0.0.1 is_virtual => true kernel => Linux kernelmajversion => 3.2 kernelrelease => 3.2.0-23-generic kernelversion => 3.2.0 lsbdistcodename => precise lsbdistdescription => Ubuntu 12.04 LTS lsbdistid => Ubuntu lsbdistrelease => 12.04 lsbmajdistrelease => 12 macaddress => 08:00:27:67:f9:0c macaddress_eth0 => 08:00:27:67:f9:0c macaddress_eth1 => 08:00:27:21:0d:74 manufacturer => innotek GmbH memoryfree => 349.12 MB memorysize => 491.62 MB netmask => 255.255.255.0 netmask_eth0 => 255.255.255.0 netmask_eth1 => 255.255.255.0 netmask_lo => 255.0.0.0 network_eth0 => 192.168.56.0 network_eth1 => 10.0.3.0 network_lo => 127.0.0.0 operatingsystem => Ubuntu operatingsystemrelease => 12.04 osfamily => Debian path => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin physicalprocessorcount => 1 processor0 => AMD Phenom(tm) II X4 955 Processor processorcount => 1 productname => VirtualBox ps => ps -ef puppetversion => 3.0.0 rubysitedir => /usr/local/lib/site_ruby/1.8 rubyversion => 1.8.7 selinux => false serialnumber => 0 sshdsakey => private, perhaps? sshecdsakey => AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBB3uUBM14qA140aAjx/oXGtc2983rX4kkCfq6wCiENg8RDSyZtqxa+Vx7okP/KXoL5yyxTYLZd4y/tVfkd2/lt0= sshfp_dsa => SSHFP 2 1 21e631b4f26b19a14caf1d2c89c38842fcce1bbe SSHFP 2 2 2a0806c1aa7eb532b8081009537a63e8549f2719a3d25a7c928bb7b7851414bc sshfp_ecdsa => SSHFP 3 1 efbed69460fa3cd3effd9304b0e80371b56c86a3 SSHFP 3 2 b30a897120220d73b519bdc9db97a354318c172e6a6dbc37de254f31bc0e164f sshfp_rsa => SSHFP 1 1 d773c45469df70b6f7072d4dc9e9265cf9782360 SSHFP 1 2 13b7fd5ace3d979d786375bc6f5e91d3ffe71fe42480900bffebc186ce6019c3 sshrsakey => private, perhaps? swapfree => 508.00 MB swapsize => 508.00 MB timezone => CEST uniqueid => 007f0100 uptime => 9:50 hours uptime_days => 0 uptime_hours => 9 uptime_seconds => 35413 virtual => virtualbox
Did you clone the gitrepo with the --recursive option? Yup, I got a gazillion submodules now ;) This is also confirmed by the fact that it complains about some syntax issue in the ntp module itself.
Did you change anything on the modules? I wouldn't dare to ;)
The only thing I can imagine is 'wrong' either is my ruby version or the version of Puppet, which is still kinda shiny. Let me know if there's anything else I can do.
I fear the module can have problems with Puppet 3.0. Going to check it out... if you can/have time, please test the same setup on Puppet 2.6/2.7 to confirm that.
I will when I have time. Although I'm afraid I wont have that any time soon. Thanks for the efforts =)
@example42 Whenever you have a quick fix or work around please let me know. I've encountered the exact same issue with the apache module as well. Presumably there are more modules that suffer from this issue under Puppet 3 (which is due any day now)
I'm investigating the issue. Good news is that once I fix the params_lookup function used in all the modules they should all work well.
This commit: https://github.com/example42/puppi/commit/245bc08ba2a6295d2cfcc503e9a6fdc2dedf39b9 should fix the problem. Please let me know if it works.
@example42 The setup that I had originally I have not gotten the opportunity of working on again. I do now however have a similar setup, but this time with apache:
Error: undefined method []=' for false:FalseClass at /etc/puppet/environments/production/modules/apache/manifests/init.pp:240 on node node.domain.tld Wrapped exception: undefined method
[]=' for false:FalseClass
Error: undefined method []=' for false:FalseClass at /etc/puppet/environments/production/modules/apache/manifests/init.pp:240 on node node.domain.tld Error: undefined method
[]=' for false:FalseClass at /etc/puppet/environments/production/modules/apache/manifests/init.pp:240 on node node.domain.tld
Could you please take another look at it? Getting this up and running is now on top of my list so will reply faster a next time.
Thanks.
Just a request before diving into the issue, are you using the latest version of the puppi module ?
@example42 I'm using ref fd8baf3075, which seems pretty uptodate(?)
Sorry, I've not been able to reproduce the issue. Tried with Puppet 3.0.0-rc6 both on client and server on Centos6 and the latest puppi revision.
Please provide more details (relevant puppet code and output of facter).
@example42 I have tried version 3rc6 on the puppetmaster, with both puppet 2.7 and 3.0 on the agent. Facter output here: https://gist.github.com/0050286e542cd4883121
Nonetheless the error is the same: err: Could not retrieve catalog from remote server: Error 400 on SERVER: undefined method `[]=' for false: FalseClass at /etc/puppet/environments/production/modules/apache/manifests/init.pp:239 on node node.tld
Config: node 'node.tld' inherits myproject_basenode { include myproject::web }
class apt::myproject {
}
class myproject::web inherits basenode::web { } class basenode::web { include apache }
Strictly speaking this is the Apache module, please let me know if you'd like me to file this error on the apache or puppi module. Please let me know if there's anything else I can do for you.
I tried to do some additional debugging. In /usr/lib/ruby/1.8/puppet/parser/functions/hiera.rb I removed the following line to acquire some more debug info: config[:logger] = "puppet"
Below is a piece of the output I was given. This was repeated for every var that's in the apache/init.pp manifest. Hope it helps ;)
DEBUG: Sat Sep 15 17:05:56 +0200 2012: Looking up apache::port in YAML backend DEBUG: Sat Sep 15 17:05:56 +0200 2012: Looking for data source defaults DEBUG: Sat Sep 15 17:05:56 +0200 2012: Cannot find datafile /var/lib/hiera/defaults.yaml, skipping DEBUG: Sat Sep 15 17:05:56 +0200 2012: Looking for data source production DEBUG: Sat Sep 15 17:05:56 +0200 2012: Cannot find datafile /var/lib/hiera/production.yaml, skipping DEBUG: Sat Sep 15 17:05:56 +0200 2012: Looking for data source global DEBUG: Sat Sep 15 17:05:56 +0200 2012: Cannot find datafile /var/lib/hiera/global.yaml, skipping DEBUG: Sat Sep 15 17:05:56 +0200 2012: Looking up apache_port in YAML backend DEBUG: Sat Sep 15 17:05:56 +0200 2012: Looking for data source defaults DEBUG: Sat Sep 15 17:05:56 +0200 2012: Cannot find datafile /var/lib/hiera/defaults.yaml, skipping DEBUG: Sat Sep 15 17:05:56 +0200 2012: Looking for data source production DEBUG: Sat Sep 15 17:05:56 +0200 2012: Cannot find datafile /var/lib/hiera/production.yaml, skipping DEBUG: Sat Sep 15 17:05:56 +0200 2012: Looking for data source global DEBUG: Sat Sep 15 17:05:56 +0200 2012: Cannot find datafile /var/lib/hiera/global.yaml, skipping DEBUG: Sat Sep 15 17:05:56 +0200 2012: Looking up apache::firewall_src in YAML backend DEBUG: Sat Sep 15 17:05:56 +0200 2012: Looking for data source defaults DEBUG: Sat Sep 15 17:05:56 +0200 2012: Cannot find datafile /var/lib/hiera/defaults.yaml, skipping DEBUG: Sat Sep 15 17:05:56 +0200 2012: Looking for data source production DEBUG: Sat Sep 15 17:05:56 +0200 2012: Cannot find datafile /var/lib/hiera/production.yaml, skipping DEBUG: Sat Sep 15 17:05:56 +0200 2012: Looking for data source global DEBUG: Sat Sep 15 17:05:56 +0200 2012: Cannot find datafile /var/lib/hiera/global.yaml, skipping DEBUG: Sat Sep 15 17:05:56 +0200 2012: Looking up firewall_src in YAML backend DEBUG: Sat Sep 15 17:05:56 +0200 2012: Looking for data source defaults
@reeaqingme I expect this kind of error should be now fixed with latest versions of Puppet/puppi or with a proper Hiera setup (I noticed that if you have hiera installed but not configured, puppi's params_lookup fails). Can you confirm that?
@example42 Sorry for not getting back at you earlier. I don't recall having seen this error any more recently. Case closed.
I cloned https://github.com/example42/puppet-modules.git into my modules dir. Then added this line to my basenode.pp manifest file as is mentioned in the readme: class { 'ntp': }
This however results in the error below:
Removing this line from my manifest makes all run flawless again. It may be that I'm missing something, but even if I did, perhaps the error message should be more descriptive.