Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Not a proper answer, but can the issues be avoided by postponing the reboot by using something like at -f $(which reboot) now + 5 min? – Stefan Seidel Jan 8 '13 at 10:51

This is a policy question as well as a technical one.

From a technical perspective, the potential problem is that your reboot will interrupt the remaining cfengine run, which might lead to a half-baked and thus corrupt state. However, this is a flawed argument - any reboot, automatic or manual or caused by hardware failure or power interruption, will have this problem, and cfengine actions and other automation should be written to deal with that.

That leaves the policy question: The system is in use for some purpose or other. You don't say whether this is for home automation, plant automation, workstation, server... the purpose decides whether it's OK to do unannounced reboots, discarding all in-flight transactions, all in-memory state, and all active sessions. Nobody besides you and your users, if any, can answer that.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .