如何在看到 "Failed to talk to init daemon" 时干净地重启核心 OS?

How to cleanly reboot core OS when "Failed to talk to init daemon" is seen?

出现以下问题后,如何彻底重启我的 coreOS?

core@node2 ~ $ sudo reboot
Failed to talk to init daemon
core@node2 ~ $ sudo shutdown -r now
Failed to talk to init daemon.
core@node2 ~ $ sudo systemctl reboot
Failed to get D-Bus connection: Operation not permitted
core@contiv-node2 ~ $ shutdown
Must be root.
core@node2 ~ $ sudo shutdown
Unable to perform operation without bus connection.
core@node2 ~ $ cat /etc/lsb-release 
DISTRIB_ID=CoreOS
DISTRIB_RELEASE=991.2.0
DISTRIB_CODENAME="Coeur Rouge"
DISTRIB_DESCRIPTION="CoreOS 991.2.0 (Coeur Rouge)"
sudo reboot -f

-f, --force Force immediate halt, power-off, reboot. Do not contact the init system.

kill -15 1

这应该会唤醒 init 守护进程,然后您应该能够正常重启。 (i.e. sudo kill -15 1; sudo reboot)

如果可能,这是比 reboot -f 更好的解决方案,因为您将能够执行干净的重启。