2017-05-14 1 views
1
==> payment: Notice: /Stage[main]/Nginx::Service/Service[nginx]/ensure: ensure changed 'stopped' to 'running' 
==> payment: Info: /Stage[main]/Nginx::Service/Service[nginx]: Unscheduling refresh on Service[nginx] 
==> payment: Info: Stage[main]: Unscheduling all events on Stage[main] 
==> payment: Info: Creating state file /opt/puppetlabs/puppet/cache/state/state.yaml 
==> payment: Notice: Applied catalog in 219.19 seconds 
The SSH command responded with a non-zero exit status. Vagrant 
assumes that this means the command failed. The output for this command 
should be in the log above. Please read the output to determine what 
went wrong. 

위의 내용을 바탕으로 실제로 실패한 것을 해결할 수 없습니까? Nginx가 예상대로 실행 중입니다.변덕 - SSH가 0이 아닌 종료 상태로 응답했습니다.

답변

2

귀하의 상황에서는 실패하지 않았습니다. Puppet이 시스템에서 변경을 초래하는 카탈로그를 성공적으로 적용하면 반환되는 종료 코드는 2입니다. Vagrant는 예기치 못한 묵시적 오류로 0이 아닌 모든 ssh 종료 코드를 해석합니다. Puppet은이 인스턴스에서 종료 코드로 2을 반환했으며 Vagrant는이를 실패로 해석했습니다.

꼭두각시 실행 후 쉘을 사용하여 echo $?을 제공하는 줄을 추가하는 것이 좋습니다. 이는 Vagrant에 원하는 0 반환 코드를 제공하고 실제 코드가 무엇인지보고 2인지 확인하도록합니다.

config.vm.provision 'shell', inline: 'echo $?' 

config을 원하는대로 로컬 Ruby 블록 변수로 바꿉니다.

https://docs.puppet.com/puppet/latest/man/agent.html#OPTIONS

관련 문제