web-dev-qa-db-ja.com

Puppet:err:/ Exec / returns:notrunから0への変更に失敗しました:コマンドがタイムアウトを超えました

Puppetとカスタムシェルスクリプトを使用してサーバーにNagiosをインストールしようとしています。すべて正常に動作しますが、puppetスクリプトの実行の最後に次のようなエラーが表示されます。

[root@localhost tmp]# /usr/local/bin/puppet --verbose nagiosscript.pp
....
.... Lines of verbose output
....
info: Scope(Class[main]): installing Nagios agent in /usr/local/nagios
info: Applying configuration version '1016779459'
notice: /Stage[main]//Exec[/tmp/check_server.sh]/returns: executed successfully
notice: /Stage[main]//File[/tmp/temporary_mount]/ensure: created
notice: /Stage[main]//Exec[mount]/returns: executed successfully
notice: /Stage[main]//Exec[retrieve_nagios_install_script]/returns: executed successfully
notice: /Stage[main]//File[/var/tmp/nagios_install.sh]/mode: mode changed '644' to '700'

err: /Stage[main]//Exec[/var/tmp/nagios_install.sh]/returns: change from notrun to 0 failed: Command exceeded timeout at /tmp/nagiosscript.pp:34

notice: Finished catalog run in 332.42 seconds

このエラーの意味はわかりませんが、nagiosのインストールはうまくいきました。

2
user151598

既知です[〜#〜] fact [〜#〜]

デフォルトでは、puppetはジョブが完了するまで300秒待機します。終了しない場合は、上記のようなエラーが表示されるだけです。 puppetスクリプトでtimeout値を定義できます。 puppetスクリプトで以下を使用します

timeout => 0,

Puppetドキュメントから:

Timeout
The maximum time the command should take. If the command takes longer than the timeout, 
the command is considered to have failed and will be stopped. 
The timeout is specified in seconds. The default timeout is 300 seconds and 
you can set it to 0 to disable the timeout.
4
Pratap