官术网_书友最值得收藏!

Detecting compilation errors

"My mechanic told me, 'I couldn't repair your brakes, so I made your horn louder.'"—Steven Wright

Usually, when there's a problem, we'll want to stop and fix it before continuing. However, when running in daemon mode, Puppet will ignore any compilation errors in the manifest and just apply the last known working version from its cache. This behavior is governed by the usecacheonfailure config setting, and its default setting, true:

# puppet --genconfig |grep usecacheonfailure
 # usecacheonfailure = true

It's worth noting that when you apply manifests by hand using puppet agent --test, this doesn't happen: Puppet will complain and refuse to do anything if there is an error in the manifest. That's because the --test switch is shorthand for the following options:

# puppet agent --onetime --verbose --ignorecache --no-daemonize --no-usecacheonfailure

Because usecacheonfailure is on when Puppet runs as a daemon, sometimes you won't notice mistakes in a manifest for a while, as Puppet keeps on silently running an old version of the manifest instead of complaining.

How to do it…

If you want to change this behavior, set the following value in puppet.conf:

usecacheonfailure = false

How it works…

With this option set, Puppet will immediately complain about errors and refuse to run until they are corrected.

主站蜘蛛池模板: 昆山市| 洛南县| 阜宁县| 怀安县| 铜鼓县| 绍兴市| 明水县| 彭泽县| 师宗县| 思南县| 仪陇县| 陆川县| 来宾市| 汶川县| 清新县| 安吉县| 呼图壁县| 冀州市| 长寿区| 慈溪市| 托克逊县| 通道| 宁阳县| 上杭县| 永川市| 射洪县| 霍林郭勒市| 阿图什市| 鄂伦春自治旗| 深水埗区| 新晃| 报价| 湖州市| 胶州市| 田阳县| 台南市| 合水县| 石楼县| 上思县| 城口县| 巩义市|