问题描述:
配置好了 puppet ,然后在客户端执行 puppet 更新,报以下错误
[root@client1 ~]# puppet agent --test --server=master.puppet.com --no-daemonize --verbose
info: Caching catalog for client1.puppet.com
info: Applying configuration version '1373362423'
err: /File[/home/php_comm/config/config_server.inc.php]: Could not evaluate: Error 400 on SERVER: Not authorized to call find on /file_metadata/php1/config_server.inc.php Could not retrieve file metadata for puppet:///php1/config_server.inc.php: Error 400 on SERVER: Not authorized to call find on /file_metadata/php1/config_server.inc.php at /etc/puppet/modules/php1/manifests/config.pp:9
err: /File[/home/php_comm2/config/config_server.inc.php]: Could not evaluate: Error 400 on SERVER: Not authorized to call find on /file_metadata/php2/config_server.inc.php Could not retrieve file metadata for puppet:///php2/config_server.inc.php: Error 400 on SERVER: Not authorized to call find on /file_metadata/php2/config_server.inc.php at /etc/puppet/modules/php2/manifests/config.pp:9
notice: Finished catalog run in 0.67 seconds
原因与解决办法:

原来是fileserver.conf 中对应的目录没有配置权限,在对应的目录设置allow * 即可 ,如下:


[php1]

  path /usr/local/puppet/php1

allow *


[php2]

  path /usr/local/puppet/php2

  allow *


再重启puppet服务,在客户端测试


[root@client1 ~]# puppet agent --test --server=master.puppet.com --no-daemonize --verbose

info: Caching catalog for client1.puppet.com

info: Applying configuration version '1373362669'

notice: /File[/home/php_comm/config/config_server.inc.php]/ensure: defined content as '{md5}e8f670a8dc2232aa0d4528d3129167f7'

notice: /File[/home/php_comm2/config/config_server.inc.php]/ensure: defined content as '{md5}a336dc9e0fac0e18d5be124eafda5cb9'

notice: Finished catalog run in 0.64 seconds