如何删除 CoreOS/Container Linux 上的 'Update Strategy: No Reboots' 消息?

How can I remove the 'Update Strategy: No Reboots' message on CoreOS/Container Linux?

我是 运行 CoreOS 上的 Kubernetes 集群,并使用 coreos/container-linux-update-operator 以受控方式更新每个节点。当我 ssh 进入其中一个节点时,我收到消息 Update Strategy: No Reboots,大概是因为我已经禁用并屏蔽了 locksmithd.service(因为不再需要它)。

我怎样才能阻止该消息出现?这实际上不是真的,因为 update-operator 正在处理更新。

这个问题在 github https://github.com/coreos/bugs/issues/1968

上有一个未解决的问题

此消息在 /etc/profile.d/coreos-profile.sh 为 运行 时生成。 /etc/profile.d/coreos-profile.sh 是指向 /usr/share/baselayout/coreos-profile.sh 的符号链接,您应该能够删除符号链接以禁用消息。

请注意,此文件也是 运行 此代码,用于在登录时显示失败单元列表。

FAILED=$(systemctl list-units --state=failed --no-legend)
if [[ ! -z "${FAILED}" ]]; then
    COUNT=$(wc -l <<<"${FAILED}")
    echo -e "Failed Units: 3[31m${COUNT}3[39m"
    awk '{ print "  "  }' <<<"${FAILED}"
fi

如果这是一个表演障碍,您可以将此功能复制到 /etc/profile.d/

中的其他脚本

通过查看包含大量脚本和配置文件的 baselayout 存储库,您可以发现很多关于 CoreOS Container linux 的信息 https://github.com/coreos/baselayout. You can find the script in question here: https://github.com/coreos/baselayout/blob/master/baselayout/coreos-profile.sh and the config used to generate the symlink here: https://github.com/coreos/baselayout/blob/master/tmpfiles.d/baselayout-etc.conf