- 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.
- SolidWorks 2021中文版機(jī)械設(shè)計(jì)從入門到精通
- Learning VirtualDub: The complete guide to capturing, processing and encoding digital video
- 超簡(jiǎn)單的攝影后期書
- SPSS進(jìn)階分析與實(shí)務(wù)
- Photoshop CS6中文版從入門到精通(核心技法卷):摳圖、修圖、Camera Raw、調(diào)色、銳化、合成
- Adobe創(chuàng)意大學(xué)Photoshop CS5 產(chǎn)品專家認(rèn)證標(biāo)準(zhǔn)教材
- 中文版Dreamweaver基礎(chǔ)培訓(xùn)教程
- Refactoring with Microsoft Visual Studio 2010
- CorelDRAW X6平面設(shè)計(jì)與制作案例教程
- 企業(yè)虛擬化實(shí)戰(zhàn):VMware篇
- 3ds Max-Photoshop游戲模型制作全攻略
- Ruby on Rails Web Mashup Projects
- PHPList 2 E/mail Campaign Manager
- Photoshop CC自學(xué)魔法書
- OpenCV輕松入門:面向Python(第2版)