4

We want to temporary disable reboot on update for a CoreOS machine, since we haven't implemented high availability of our services yet. Is there away to achieve that other than editing the cloud-init configuration (provided when the machine being provisioned the first time)

9

CoreOS uses a tool called locksmith to coordinate reboots across the cluster. You can use this tool to temporarily prevent reboots by jumping onto a machine and running locksmithctl lock, which will indicate to the cluster that a machine has already taken the reboot slot and will keep it occupied until you run locksmithctl unlock.

Your best bet however, is to edit the cloud-config.

  • So it's to say the reboot strategy is not changeable after being set at machine creation? – Phuong Nguyen Jan 14 '15 at 4:38
  • 6
    @PhuongNguyen reboot strategy can be changed via the configuration file /etc/coreos/update.conf. Inside that file you can change the optiion "REBOOT_STRATEGY". If indeed you just want to make the change temporary as mentioned in the original post Rob's solution is exactly what you're looking for. If you want the change to be permanent then make it in that file. If you never want reboots to happen automatically (which is not advised) then turn off the update-engine service. – Brian Redbeard Jan 20 '15 at 17:54
  • Thanks, your explanation suit me better than Rob answer though. – Phuong Nguyen Jan 21 '15 at 16:25
  • @BrianRedbeard How can we turn off update-engine service permanently? – Ibn Saeed Mar 16 '15 at 4:50
  • 2
    @IbnSaeed As people have mentioned this is not recommended, but you can disable update-service permanently by masking it: sudo systemctl disable update-engine; sudo systemctl stop update-engine; sudo systemctl mask update-engine – spkane Oct 21 '16 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.