Is the reboot resource idempotent? To extend Joshua’s answer one can run chef-client as a daemon on a node and run this recipe.
# Put resources that need to converge before a reboot here resource1 “Some resource”
resource2 “Some resource” # Reboot the machine reboot “Need to reboot for kernel changes to take effect” # Put resources that need to converge after a reboot here Resource3 “Some resource”
Resource4 “Some resource” What will this recipe do after the reboot? I know it will not converge resource1 and resource2, but will it converge the reboot resource? You can put guards
against it but just wondering what the vanilla behavior will be. Chris From: Joshua Timberman [mailto:
You are correct in that Chef doesn't have a "resume after reboot" option. However, Chef is both idempotent and convergent. Rerunning chef after reboot will result in NOT configuring the system resources that are in the state declared by
the recipes. For example, if your recipes manage a config file and install a package, those won't change when chef reruns. However if the reboot made a change to a file chef manages then it will be updated by chef after the reboot. Make sense? Cheers, Joshua Hello,
|
Archive powered by MHonArc 2.6.16.