首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无人值守的升级触发无声重新启动

无人值守的升级触发无声重新启动
EN

Ask Ubuntu用户
提问于 2020-07-14 09:29:55
回答 1查看 2.3K关注 0票数 2

在过去的几个星期里,我工作了几次,突然我的桌面消失了,我的机器完全重新启动。

在今早再次发生这种情况之后,我通过syslog跟踪了它,我能找到的最接近的事件可能是unattended-upgrades.service: Succeeded

代码语言:javascript
复制
Jul 14 10:02:42 pc charon: 05[NET] sending packet: from 192.168.1.214[4500] to 123.321.123.321[4500] (92 bytes)
Jul 14 10:03:02 pc charon: 08[IKE] sending keep alive to 123.321.123.321[4500]
Jul 14 10:03:03 pc systemd[1]: unattended-upgrades.service: Succeeded.
Jul 14 10:03:03 pc systemd[1]: Stopping Session 2 of user philip.
Jul 14 10:03:03 pc systemd[1]: Removed slice system-clean\x2dmount\x2dpoint.slice.
Jul 14 10:03:03 pc systemd[1]: Removed slice system-getty.slice.
Jul 14 10:03:03 pc systemd[2039]: Stopped target GNOME Wayland Session (session: gnome).
Jul 14 10:03:03 pc systemd[2039]: Stopped target GNOME Session.
Jul 14 10:03:03 pc systemd[2039]: Stopped target GNOME Wayland Session.
Jul 14 10:03:03 pc systemd[2039]: Stopped target GNOME Session (session: gnome).
Jul 14 10:03:03 pc systemd[2039]: Stopped target GNOME Accessibility settings.
Jul 14 10:03:03 pc systemd[2039]: Stopped target GNOME Color management.
Jul 14 10:03:03 pc systemd[2039]: Stopped target GNOME Date & Time handling.
Jul 14 10:03:03 pc systemd[2039]: Stopped target GNOME Maintenance of expirable data.

我并不反对正常的无人值守的升级,但是没有警告的无声重启是非常糟糕的。今天早上,我打开了15个窗口,并且正在调试一些棘手的代码。我花了30分钟才回到原来的地方。

无声的重启是否带有无人参与的升级,这是正常/可配置的吗?

阻止这种重新启动发生的推荐方法是什么?

奇怪的是,它似乎没有被配置为这样做:

代码语言:javascript
复制
$ grep -irnC2 reboot /etc/apt/apt.conf.d/
/etc/apt/apt.conf.d/50unattended-upgrades-90-//Unattended-Upgrade::Remove-Unused-Dependencies "false";
/etc/apt/apt.conf.d/50unattended-upgrades-91-
/etc/apt/apt.conf.d/50unattended-upgrades:92:// Automatically reboot *WITHOUT CONFIRMATION* if
/etc/apt/apt.conf.d/50unattended-upgrades:93://  the file /var/run/reboot-required is found after the upgrade
/etc/apt/apt.conf.d/50unattended-upgrades:94://Unattended-Upgrade::Automatic-Reboot "false";
/etc/apt/apt.conf.d/50unattended-upgrades-95-
/etc/apt/apt.conf.d/50unattended-upgrades:96:// Automatically reboot even if there are users currently logged in
/etc/apt/apt.conf.d/50unattended-upgrades:97:// when Unattended-Upgrade::Automatic-Reboot is set to true
/etc/apt/apt.conf.d/50unattended-upgrades:98://Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
/etc/apt/apt.conf.d/50unattended-upgrades-99-
/etc/apt/apt.conf.d/50unattended-upgrades:100:// If automatic reboot is enabled and needed, reboot at the specific
/etc/apt/apt.conf.d/50unattended-upgrades-101-// time instead of immediately
/etc/apt/apt.conf.d/50unattended-upgrades-102-//  Default: "now"
/etc/apt/apt.conf.d/50unattended-upgrades:103://Unattended-Upgrade::Automatic-Reboot-Time "02:00";
/etc/apt/apt.conf.d/50unattended-upgrades-104-
/etc/apt/apt.conf.d/50unattended-upgrades-105-// Use apt bandwidth limit feature, this example limits the download
EN

回答 1

Ask Ubuntu用户

发布于 2020-07-14 12:35:28

无论无人值守升级是否重新引导您的系统,系统都由配置文件/etc/apt/apt.conf.d/50unattended-upgrades中的条目控制。

我的文件被设置为不允许重新启动(默认),文件的相关部分如下所示

代码语言:javascript
复制
// Automatically reboot *WITHOUT CONFIRMATION*
//  if the file /var/run/reboot-required is found after the upgrade 
//Unattended-Upgrade::Automatic-Reboot "false";

// If automatic reboot is enabled and needed, reboot at the specific
// time instead of immediately
//  Default: "now"
//Unattended-Upgrade::Automatic-Reboot-Time "02:00";
票数 2
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1258916

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档