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

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.

主站蜘蛛池模板: 嘉定区| 北票市| 苏尼特左旗| 武冈市| 五指山市| 海淀区| 德保县| 黄山市| 什邡市| 嘉鱼县| 宜宾市| 勃利县| 凤城市| 双牌县| 林芝县| 无棣县| 赤水市| 银川市| 门源| 宜黄县| 德江县| 内丘县| 厦门市| 巴东县| 鄂伦春自治旗| 盱眙县| 连江县| 禄丰县| 彭泽县| 深圳市| 库尔勒市| 犍为县| 南阳市| 大洼县| 凌云县| 安多县| 兴业县| 大同县| 眉山市| 黔南| 舞钢市|