Q1:最近测试3.7.1 的版本出现了一个问题:The package type's allow_virtual parameter will be changing its default value from false to true in a future release
A1:
[root@agent1 ~]# puppet --version
3.7.1
[root@agent1 ~]# puppet agent --test --server master.jeffery.com --noop
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for agent1.jeffery.com
Warning: The package type's allow_virtual parameter will be changing its default value from false to true in a future release. If you do not want to allow virtual packages, please explicitly set allow_virtual to false.
(at /usr/lib/ruby/site_ruby/1.8/puppet/type/package.rb:430:in `default')
Info: Applying configuration version '1413249918'
Notice: Finished catalog run in 0.11 seconds
出现一个警告,但不影响执行的结果,有群友说是版本有问题,最终我也不知道是神码问题的。。
可以在服务器端的 pp文件中的package 中加入 :allow_virtual => false, 来解决出现的警告。
检查文件的正确性spacer.gif
测试
Q2:
puppet Error 400 on SERVER Permission denied
Error: /Stage[main]/Ssh::Config/File[/etc/ssh/sshd_config]: Could not evaluate: Error 400 on SERVER: Permission denied - /etc/puppet/modules/ssh/files/sshd_config Could not retrieve file metadata for puppet:///modules/ssh/sshd_config: Error 400 on SERVER: Permission denied - /etc/puppet/modules/ssh/files/sshd_config
A2: chmod -R ./ssh/files/*
Q3:
What causes the error “Could not retrieve catalog from remote server: execution expired” in Puppet
This can be caused when the load on the Puppet Master server is too high to send compiled catalogs to the agents.
Start by checking if any services are using all the available resources, or if the server is under-powered for the requests it is getting. If all agents run at the same time, edit the cron job that controls their run time to spread it out.
If all else fails, allowing the agents to take longer to receive the catalog may work. This can be done by adding the configtimeout setting to the puppet.conf file (/etc/puppet/puppet.conf) and increasing the value. It defaults to "2m", meaning two minutes.
Q4:
Error: Could not retrieve catalog from remote server: Connection refused - connect(2)
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Error: Could not send report: Connection refused - connect(2)
此错误是没有启动puppet master服务 或是没有绑定主机名/DNS 未得到正确解析
[14:37:04][root@agent01 ~]$ cat /etc/hosts | grep 192
#192.168.9.10 master01.ocean.org master01
#192.168.9.20 agent01.ocean.org agent01
取消注释 再次执行 问题解决