vagrant - How can I get chef to reboot the node, and pick up the recipe from where it left off? -


i'm trying set asterisk server chef using berkshelf , vagrant, , i'd first upgrade kernel running

apt-get upgrade

, , rebooting machine.

how can trigger reboot in recipe, , have pick after machine reboots? have no problem using fabric,

execute "reboot"

the chef provisioner in vagrant died machine rebooted

idempotence 1 of principles of chef.

this means recipe can run on , on again, , change things not expected.

so in case this:

  • first chef run notices unexpected kernel installed. installs kernel , triggers reboot.
  • chef runs again, identifies kernel installed expected , continues. can continue other things.

one note: i've never tried this, signalling reboot in middle of chef run damage. i'd recommend abort chef run after reboot signal (e.g. through raising exception, see how abort/end chef run?).


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -