0

Specifically, if cfengine is used to install the most recent version of an onboard device's firmware and do some tests to see if a reboot is required, and the results indicate that the machine needs a restart, is this something that can be done from within cfengine or should that practice be avoided? If so, why? My experience with Puppet tells me that stopping a run to reboot could be a Very Bad Thing in certain cases, so I'm wondering if the same limitations apply to cfengine as well.

4

2 回答 2

0

停止 CFEngine 运行并没有那么糟糕。它被设计成收敛的,修改总是原子的。如果它停止,下一次运行将正常运行。

但是,编写重启设备的 promise 可能会导致意外情况(例如,如果 promise 的逻辑存在缺陷,则会导致永无止境的重启),因此我建议尽可能避免这种情况,并且如果有必要(例如处理数千台设备),则应对其进行彻底测试

于 2013-01-08T10:46:24.610 回答
0

正如 Nicolas 所说,停止 CFEngine 运行并没有什么坏处。CFEngine 策略将在下次运行时继续收敛。如果您想确保在重新启动之前一切都已正确完成,您可以设置一个指示需要重新启动的类,并在一个单独的捆绑包中实际重新启动,该捆绑包在您的捆绑序列末尾附近调用(我是假设CFEngine 3)。

确实,要非常注意并非常仔细地测试重启的条件!

于 2013-01-08T16:15:59.267 回答