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

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.

主站蜘蛛池模板: 宁国市| 策勒县| 周宁县| 五华县| 扶余县| 龙州县| 多伦县| 赤壁市| 定边县| 常山县| 元阳县| 平遥县| 潍坊市| 茶陵县| 海原县| 宣化县| 长岛县| 连云港市| 商水县| 息烽县| 太白县| 原平市| 广河县| 马边| 凤城市| 介休市| 青冈县| 翼城县| 宣武区| 奎屯市| 雅江县| 丹棱县| 红桥区| 聂拉木县| 乌鲁木齐市| 池州市| 桂东县| 页游| 玛多县| 南乐县| 铁力市|