2014-03-26 2 views
3

설치 후 꼭두각시로 foreman-1.2을 설치했습니다. 설치 후 꼭두각시를 smart-proxy에 등록했습니다.꼭두각시 node.rb 오류가있는 포먼 012 찾을 수 없습니다.

나는

[[email protected] ~]# /etc/puppet/node.rb puppet.example.com 
--- false 
Error retrieving node puppet.example.com: Net::HTTPNotFound 

foreman.log 디버그

Started GET "/node/puppet.example.com?format=yml" for 10.101.20.15 at 2014-03-25 21:01:47 -0400 
Processing by HostsController#externalNodes as YML 
    Parameters: {"name"=>"puppet.example.com"} 
    Setting Load (1.3ms) SELECT `settings`.* FROM `settings` WHERE `settings`.`name` = 'restrict_registered_puppetmasters' ORDER BY name LIMIT 1 
    Setting Load (0.3ms) SELECT `settings`.* FROM `settings` WHERE `settings`.`name` = 'require_ssl_puppetmasters' ORDER BY name LIMIT 1 
    SmartProxy Load (0.5ms) SELECT `smart_proxies`.* FROM `smart_proxies` INNER JOIN `features_smart_proxies` ON `features_smart_proxies`.`smart_proxy_id` = `smart_proxies`.`id` INNER JOIN `features` ON `features`.`id` = `features_smart_proxies`.`feature_id` WHERE `features`.`name` = 'Puppet' ORDER BY smart_proxies.name 
    Setting Load (0.3ms) SELECT `settings`.* FROM `settings` WHERE `settings`.`name` = 'trusted_puppetmaster_hosts' ORDER BY name LIMIT 1 
Verifying request from ["puppet.example.com"] against ["puppet.example.com"] 
    User Load (0.4ms) SELECT `users`.* FROM `users` WHERE `users`.`login` = 'admin' LIMIT 1 
Setting current user thread-local variable to admin 
    Host::Managed Load (0.7ms) SELECT `hosts`.* FROM `hosts` WHERE `hosts`.`type` IN ('Host::Managed') AND `hosts`.`certname` = 'puppet.example.com' LIMIT 1 
    Host::Managed Load (0.6ms) SELECT `hosts`.* FROM `hosts` WHERE `hosts`.`type` IN ('Host::Managed') AND `hosts`.`name` = 'puppet.example.com' LIMIT 1 
Completed 404 Not Found in 25ms (ActiveRecord: 4.1ms) 

내가 뭔가를 놓치고 다음 시도 명령

[[email protected] ~]# puppet agent -t 
Warning: Unable to fetch my node definition, but the agent run will continue: 
Warning: Error 400 on SERVER: Failed to find puppet.example.com via exec: Execution of '/etc/puppet/node.rb puppet.example.com' returned 1: --- false 

Info: Retrieving plugin 
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed when searching for node puppet.example.com: Failed to find puppet.example.com via exec: Execution of '/etc/puppet/node.rb puppet.example.com' returned 1: --- false 

Warning: Not using cache on failed catalog 
Error: Could not retrieve catalog; skipping run 

를 다음 실행할 때? 먼저 foreman GUI에 호스트를 생성해야합니까? 나는 개념을 이해할 수 없다. node.rb

답변

2

먼저 node.rb의 내용을 확인해야한다. 작동시키기 위해서는 많은 변수가 설정되어야합니다. "Net :: HTTPNotFound"에서 Foreman 서버를 찾을 수 없다고 표시되어 이것이 수행되지 않은 것 같습니다.

둘째로, 예 및 아니오 - Froreman에서 먼저 호스트를 정의해야합니다. 호스트가 포어 맨에 존재하지 않으면 포어 맨은 "만들 수도 있습니다 - 포어 맨을 어떻게 설정 했느냐에 달려 있습니다.

메모리가 제대로 작동하면 사실을 node.rb (해당 노드가 활성화되어있는 경우)가 업로드 할 때 존재하지 않는 호스트가 생성됩니다. 명령 줄에서 방금 실행하면 사실을 업로드하지 않고 호스트를 만들지 않습니다.

테스트를 위해 호스트가 Foreman에서 만들어 졌는지 확인하십시오. 그런 다음 node.rb를 테스트하십시오 (노드의 vars가 올바르게 설정되었는지 확인한 후).

EDIT : 마지막 질문입니다. node.rb의 주요 기능은 서버용 yaml 형식화 된 구성을 가져 와서 꼭두각시에게 건네는 것입니다. 또한 Secondary는 서버에서 Foreman으로 사실을 업로드하는 기능을합니다. Foreman에서 서버를 분류하는 데 사용할 수 있습니다.

1

기본적으로 마스터와 에이전트는 서로 (/ etc/hosts 또는 dns를 통해) 익숙해야합니다. 마스터가 상담원 이름을 확인할 수없는 경우 (예 : puppet.example.com)

관련 문제