On 04/10, MikeM wrote:
> I'm new to CoreOS but have been using it on a single host EC2 deployment
> and want to use locksmith to set a maintenance window.
>
> Based on the docs at
https://github.com/coreos/locksmith#reboot-windows, I
> would expect to see environment variables for locksmith but there are none
> - not sure if there is another way to check if the window is properly set.
> The logs also indicate the system's last update reboot occurred outside of
> the maintenance window. Everything else seems to work great.
>
> I'm sure it's something unbelievably simple that I'm missing, but I can't
> figure it out. All suggestions greatly appreciated!
The parameters are written as drop-ins for locksmithd.service. For
example, on my system I see the following:
# /etc/systemd/system/locksmithd.service.d/window.conf
[Service]
Environment=REBOOT_WINDOW_START=05:00
Environment=REBOOT_WINDOW_LENGTH=10m
Off the top of my head, there are two potential reasons why it may have
rebooted outside the window. First, there may be a bug around the etcd
locking mechanism where very large clusters may take longer than the
reboot window to fully upgrade. I haven't looked at the code, so I'm not
sure if this is actually possible. The second reason, and much more
likely, is that locksmith's config was written after it was restarted.
We can test to see if there was an ordering issue by looking at the
logs (`journalctl -u locksmithd -t coreos-cloudinit --no-pager`). If
coreos-cloudinit wrote the config after locksmith started and didn't
restart it, that would explain the error.
-Alex