Ошибка марионетки: возвращено 1 вместо одного из [0]

При использовании Puppet я получаю такие сообщения об ошибках, как

вернул 1 вместо одного из [0]

Есть ли способ вывести / получить фактическое сообщение об ошибке?

10
задан 20 November 2012 в 21:04
1 ответ

Sounds like you're dealing with an exec resource, right?

By default, the output of the command is logged by puppet in cases (like this one) that the command has failed - see the logoutput setting of the exec resource type.

If you're not seeing any other error output, it's possible the command simply didn't provide any (completely silent in both stdout and stderr); you may need to look into setting the application you're running into a more verbose mode.

Some applications return a non-zero exit code on success (though your 1 is almost certainly a failure of some kind). To account for this, you can set returns to the set of exit codes that's expected on success; that's where the [0] in your error message comes from.

Setting this in your exec resource, for instance, would consider any of these three exit codes as a "successful" execution.

returns => [0, 2, 14]
14
ответ дан 2 December 2019 в 22:07

Теги

Похожие вопросы