2016-10-07 8 views
0

모든 설정을 두 번 확인했지만 문제를 찾지 못했으며 여기에서 도움을 요청하려고합니다. 때마다 나는 이제꼭두각시 : 오류 400 파일을 찾을 수 없습니다.

[...] 
# extra mountpoint 
path /sites 
allow * 
[...] 

:

puppet.conf :

[...] 
[master] 
environmentpath  = $confdir/environments/ 
hiera_config  = $confdir/environments/production/sites/xy/config/hiera.yaml 
default_manifest = ./sites/xy/config/ 
environment_timeout = 0 

fileserver.conf :

[...] 
[sites] 
    path /etc/puppet/environments/production/sites/ 
    allow * 

auth.conf

나 구성을 보여 드리죠 Puppet을 실행하고 imp를 시도합니다. 나는 XY하여 민감한 정보를 교환했다

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find any files from puppet:///sites/xy/files/xy/xy.key.pub at /etc/puppet/environments/production/modules/xy/manifests/xy.pp:88 on node xy 
Warning: Not using cache on failed catalog 
Error: Could not retrieve catalog; skipping run 

참고 그러나 디버깅을 위해 나는 가능한 모든 세부 사항을 제공하려고 : lement는 특정 파일 나는이 얻을. (올바른 권한 이럴 포함) 그래서 /sitesfileserver.conf에 따라 /etc/puppet/environments/production/sites/ 포인트 및 디렉토리는 다음과 같이 존재합니다

/etc/puppet % ls -ld /etc/puppet/environments/production/sites/ 
drwxr-xr-x 8 root puppet 4096 Oct 7 12:46 /etc/puppet/environments/production/sites/ 

다음과 같습니다 puppet:///sites/xy/files/xy/xy.key.pub 그러므로 /etc/puppet/environments/production/sites/xy/files/xy/xy.key.pub에 위치해야 언급 된 파일 :

/etc/puppet % ls -l /etc/puppet/environments/production/sites/*/files/*/*.key.pub 
-rw-r--r-- 1 root puppet 725 Oct 7 12:46 /etc/puppet/environments/production/sites/xy/files/xy/xy.key.pub 

그리고이 파일을로드하는 모듈의 줄 88을 언급 한 오류 메시지에서 다음과 같이 보입니다 :

xy.key.pub${sitefiles}입니다

이 같은 요청 된 파일의 평가 경로를지도하는 sites/$site/files입니다 : 꼭두각시 puppet:///sites/xy/files/xy/xy.key.pub

답변

0

기능 file()puppet:// 꼭두각시의 마운트 포인트를 처리 할 수 ​​없습니다. https://docs.puppet.com/puppet/latest/reference/function.html#file의 공식 문서는 특별히 언급하지는 않지만 언급하지 않고서는 추가 마운트 포인트를 처리 할 수없고 모듈 파일 디렉토리에서 파일을로드하려고한다는 것을 의미합니다.

내 솔루션 : 절대 변하지 않거나 적어도 자주는 아니지만 $sitefiles_absolute = "/etc/puppet/environments/${environment}/sites/xy/files/"과 같이 내 "사이트 파일"의 절대 경로를 선언하는 변수를 사용합니다. site.pp 파일에 보관하면 모든 노드와 모듈에서 사용할 수 있습니다.

+0

실제로 잘못 된 것이 아닙니다. 문제를 해결하는 데 도움을 주시겠습니까? 아니면 해결 방법에 만족하십니까? –

+0

더 나은 해결책을 가지고 가십시오 :) @MattSchuchard 정확한 이유를 아는 데 감사하겠습니다. – thonixx

+0

다소 긴 설명이 필요하고 휴가 때문에 게으른 느낌이 들기 때문에 John Bollinger 등이 실제로 그렇게하기를 바랬습니다. 나는 이것을 며칠 만에 다시 볼 수있다. –

관련 문제