- Puppet 2.7 Cookbook
- John Arundel
- 215字
- 2021-04-02 18:20:00
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.
- 常用工具軟件案例教程
- DotNetNuke 5.4 Cookbook
- ANSYS 14熱力學(xué)·電磁學(xué)·耦合場分析自學(xué)手冊
- DWR Java AJAX Applications
- 零基礎(chǔ)學(xué)后期:Photoshop+Lightroom數(shù)碼照片處理從新手到高手
- 3ds Max 2015中文版從入門到精通
- Excel數(shù)據(jù)管理:不加班的秘密
- CorelDRAW 2020中文版入門、精通與實(shí)戰(zhàn)
- 碼上學(xué)會(huì):中文版Creo 3.0機(jī)械設(shè)計(jì)全能一本通(雙色版)
- 中文版Photoshop CS6從新手到高手·全彩版
- 中文版Photoshop CS6完全自學(xué)手冊(超值版)
- Photoshop & Illustrator平面設(shè)計(jì)火星課堂
- UG NX 12.0中文版實(shí)戰(zhàn)從入門到精通
- Photoshop+Firefly從入門到精通
- 工作型PPT該這樣做