【发布时间】:2020-07-18 00:10:47
【问题描述】:
我在 Google Cloud 上使用 Container Optimized OS,发现“自动更新”功能没有 apply the updates until the system is restarted,并且不提供任何在应用更新后安排重新启动的功能。
我正在编写一个简单的启动脚本,用于在需要重新启动时安排关机,本质上是:
#!/usr/bin/env sh
update_engine_client --block_until_reboot_is_needed
shutdown -r 02:00
我的问题是:如何确定是否已安排关机?到目前为止,我已经尝试了三种在此操作系统中不起作用的方法:
-
$ ps -ef | grep shutdown- 没有关机进程 -
$ systemctl status systemd-shutdownd.service-Unit systemd-shutdownd.service could not be found. -
cat /run/systemd/shutdown/scheduled- 找不到文件
有关此操作系统及其所基于的文档很少。什么决定了如何安排关机,以及 COS 如何处理它?
【问题讨论】:
标签: google-container-os google-container-optimized-os