Ubuntu 无人值守升级停止 Docker

Ubuntu 无人值守升级停止 Docker

这是我当前的50-unattended-upgrades文件:

Unattended-Upgrade::Automatic-Reboot "false";
Unattended-Upgrade::Allowed-Origins {
    "${distro_id}:${distro_codename}";
    "${distro_id}:${distro_codename}-security";
    "${distro_id}ESM:${distro_codename}";
    "${distro_id}:${distro_codename}-updates";
};

// List of packages to not update (regexp are supported)
Unattended-Upgrade::Package-Blacklist {};
Unattended-Upgrade::DevRelease "false";
Unattended-Upgrade::Remove-Unused-Kernel-Packages "true";
Unattended-Upgrade::Remove-Unused-Dependencies "true";

containerd凌晨进行了升级

2020-04-03 06:39:18,853 INFO Initial blacklisted packages:
2020-04-03 06:39:18,854 INFO Initial whitelisted packages:
2020-04-03 06:39:18,854 INFO Starting unattended upgrades script
2020-04-03 06:39:18,854 INFO Allowed origins are: o=Ubuntu,a=bionic, o=Ubuntu,a=bionic-security, o=UbuntuESM,a=bionic, o=Ubuntu,a=bionic-updates
2020-04-03 06:39:22,458 INFO Packages that will be upgraded: containerd
2020-04-03 06:39:22,458 INFO Writing dpkg log to /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
2020-04-03 06:39:29,941 INFO All upgrades installed

这导致docker通过 Systemd 停止。

Apr 03 06:39:23 ip-10-2-1-12 systemd[1]: Stopping Docker Application Container Engine...
Apr 03 06:39:23 ip-10-2-1-12 dockerd[3214]: time="2020-04-03T06:39:23.782508859Z" level=info msg="Processing signal 'terminated'"
Apr 03 06:39:23 ip-10-2-1-12 dockerd[3214]: time="2020-04-03T06:39:23.933398454Z" level=info msg="ignoring event" module=libcontainerd namespace=moby
topic=/tasks/delete type="*events.TaskDelete"
Apr 03 06:39:23 ip-10-2-1-12 dockerd[3214]: time="2020-04-03T06:39:23.945486871Z" level=info msg="ignoring event" module=libcontainerd namespace=moby
topic=/tasks/delete type="*events.TaskDelete"
Apr 03 06:39:24 ip-10-2-1-12 dockerd[3214]: time="2020-04-03T06:39:24.155022784Z" level=info msg="stopping event stream following graceful shutdown" e
rror="<nil>" module=libcontainerd namespace=moby
Apr 03 06:39:24 ip-10-2-1-12 systemd[1]: Stopped Docker Application Container Engine.

有什么方法可以覆盖此行为吗?我更喜欢systemctl restart而不是systemctl stop

相关数据:

  • Ubuntu 18.04.4 LTS
  • Docker 19.03.6 安装apt

相关内容