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

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.

主站蜘蛛池模板: 聂荣县| 勃利县| 邵东县| 牙克石市| 云霄县| 洛浦县| 盐亭县| 昌吉市| 秦皇岛市| 彭阳县| 通化县| 屯昌县| 永清县| 金乡县| 佳木斯市| 郓城县| 开化县| 永嘉县| 太白县| 南昌市| 徐州市| 盘山县| 新绛县| 米易县| 禹州市| 抚远县| 淳化县| 文登市| 正宁县| 台山市| 富川| 金门县| 玛曲县| 河南省| 讷河市| 定边县| 长岭县| 洪湖市| 江川县| 澎湖县| 梨树县|