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)
Asked
Active
Viewed 4,443 times
1 Answers
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.

Rob
- 431
- 2
- 2
-
So it's to say the reboot strategy is not changeable after being set at machine creation? – Phuong Nguyen Jan 14 '15 at 04: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"](https://github.com/coreos/locksmith/blob/master/README.md). 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 04: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