我在主人和兩者(測試和產品)上使用環境。該environment.conf
這兩個環境(在兩個環境中相同)包含:未找到Puppet節點,未使用默認節點
modulepath = ./modules:../common/modules
manifest = ./main.pp
的main.pp
文件(也相同)包含:
include(lookup('classes', { 'merge' => 'unique' }))
node default { }
我現在有一個ENC shell腳本,是字面上一行,只是輸出一個節點使用的環境,因爲它也在puppet.conf
中,所以這看起來不是必須的,所以我試圖刪除ENC。主機上運行puppet agent
工作正常,沒有配置ENC。然而,當我嘗試一個新的節點上運行puppet agent
,而對主配置的ENC,我得到這樣的迴應:
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Failed when searching for node [...]: You must set the 'external_nodes' parameter to use the external node terminus
即使是我註釋掉在兩個環境中default
節點,我仍然得到這個錯誤。即使在新節點上的puppet agent
命令行和/或[master]
內的puppet.conf
中指定環境,我也會得到相同的錯誤。
我使用Hiera,並且對於Hiera一個節點文件的新節點,但不提供節點定義(據我所知),所以我不知道如果它得到那麼遠。我希望它使用default
節點並從Hiera獲得課程。
我想我的問題是爲什麼它給我這個錯誤,它不應該使用默認節點?
更新1:
這裏是puppet.conf
是被分配:
[agent]
server = puppet-prod.foo.com
[main]
environment = prod
[master]
dns_alt_names = puppet-prod,puppet-prod.foo.com
這些都是我刪除擺脫ENC的線路:
external_nodes = /usr/local/bin/puppet-node-classifier
node_terminus = exec
trusted_server_facts = true
韋爾普,看起來也許木偶緩存一些配置信息,當它稱,它不會重新加載它所有。重新啓動它工作(我正在運行'--no-daemonize --verbose'來調試)。 – Josh
由於問題是通過重新啓動主服務器解決的,因此我投票結束,因爲無法再生產。 –
從技術上講,它是可重複的,只需啓動ENC配置的Puppet,然後在不重新啓動的情況下更改配置。不過,我很關閉它。 – Josh