Livepatch 关闭整个用户运行时,只是为了检查补丁

Livepatch 关闭整个用户运行时,只是为了检查补丁

启用 Ubuntu Pro 后,我注意到我的服务随机出现故障。

经过调查,原来 Docker rootless 服务正在被 Livepatch 关闭。看起来 Livepatch 将停止整个非 root 用户会话,只是检查补丁。

为什么会发生这种情况?我可以限制 Livepatch 仅在有补丁时停止服务吗?或者在特定时间运行?

我按照论坛中的快速设置指南进行操作: https://discourse.ubuntu.com/t/ubuntu-pro-beta-tutorial/31018 并使用官方 repos 设置无根 docker。

我认为在使用以 root 身份运行的 docker 进行测试时没有遇到同样的问题。

Livepatch日志:

Oct 22 20:48:59 server canonical-livepatch.canonical-livepatchd[626]: Client information is recent, not refreshing.
Oct 22 21:45:16 server canonical-livepatch.canonical-livepatchd[626]: Client information is recent, not refreshing.
Oct 22 22:40:26 server canonical-livepatch.canonical-livepatchd[626]: Client information is recent, not refreshing.

Syslogs:(请注意,从运行时关闭到 livepatch 应答not refreshing并重新启动一切花了 20 分钟)

Oct 22 21:17:01 server CRON[21339]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Oct 22 21:21:52 server systemd[1]: session-70.scope: Deactivated successfully.
Oct 22 21:21:52 server systemd[1]: session-70.scope: Consumed 1.035s CPU time.
Oct 22 21:22:02 server systemd[1]: Stopping User Manager for UID 1000...
Oct 22 21:22:02 server systemd[20525]: Stopping libcontainer container 35f885360294c71ffb8bbf7abd60573f6326c3932b49e0c154b109c7c24f13c8...
Oct 22 21:22:02 server systemd[20525]: Stopping libcontainer container 6c5c11a84ec88d046d69cc74f570ab90be7d629b5e0311a1f13052ac8b0ea819...
Oct 22 21:22:02 server systemd[20525]: Stopping libcontainer container 8269a937c9065c37667713326dc77aa77d2c24015bda1eae700514384232fadb...
Oct 22 21:22:02 server systemd[20525]: Stopping libcontainer container 9ab8f94852ccc241c0245cfb63c39ec2a37be80b72d2c3696485eddc3ec4498b...
Oct 22 21:22:02 server systemd[20525]: Stopped target Main User Target.
Oct 22 21:22:02 server systemd[20525]: Stopping D-Bus User Message Bus...
Oct 22 21:22:02 server dockerd-rootless.sh[20582]: time="2022-10-22T21:22:02.421447703Z" level=info msg="Processing signal 'terminated'"
Oct 22 21:22:02 server systemd[20525]: Stopping Docker Application Container Engine (Rootless)...
Oct 22 21:22:02 server systemd[20525]: Stopped D-Bus User Message Bus.
Oct 22 21:22:02 server systemd[20525]: Stopped libcontainer container 6c5c11a84ec88d046d69cc74f570ab90be7d629b5e0311a1f13052ac8b0ea819.
Oct 22 21:22:02 server dockerd-rootless.sh[20582]: time="2022-10-22T21:22:02.472094516Z" level=info msg="ignoring event" container=6c5c11a84ec88d046d69cc74f570ab90be7d629b5e0311a1f13052ac8b0ea819 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Oct 22 21:22:02 server dockerd-rootless.sh[20598]: time="2022-10-22T21:22:02.472849811Z" level=info msg="shim disconnected" id=6c5c11a84ec88d046d69cc74f570ab90be7d629b5e0311a1f13052ac8b0ea819
Oct 22 21:22:02 server dockerd-rootless.sh[20598]: time="2022-10-22T21:22:02.472983028Z" level=warning msg="cleaning up after shim disconnected" id=6c5c11a84ec88d046d69cc74f570ab90be7d629b5e0311a1f13052ac8b0ea819 namespace=moby
Oct 22 21:22:02 server dockerd-rootless.sh[20598]: time="2022-10-22T21:22:02.473005844Z" level=info msg="cleaning up dead shim"
Oct 22 21:22:02 server systemd[20525]: Stopped libcontainer container 35f885360294c71ffb8bbf7abd60573f6326c3932b49e0c154b109c7c24f13c8.
Oct 22 21:22:02 server systemd[20525]: docker-35f885360294c71ffb8bbf7abd60573f6326c3932b49e0c154b109c7c24f13c8.scope: Consumed 3.558s CPU time.
Oct 22 21:22:02 server dockerd-rootless.sh[20598]: time="2022-10-22T21:22:02.511228901Z" level=warning msg="cleanup warnings time=\"2022-10-22T21:22:02Z\" level=info msg=\"starting signal loop\" namespace=moby pid=21372 runtime=io.containerd.runc.v2\n"
Oct 22 21:22:02 server kernel: [157295.944919] br-6c0b88f8ba26: port 1(veth5577bc5) entered disabled state
Oct 22 21:22:02 server kernel: [157295.944987] veth9228e2c: renamed from eth0
Oct 22 21:22:02 server dockerd-rootless.sh[20582]: time="2022-10-22T21:22:02.523744814Z" level=info msg="ignoring event" container=35f885360294c71ffb8bbf7abd60573f6326c3932b49e0c154b109c7c24f13c8 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Oct 22 21:22:02 server dockerd-rootless.sh[20598]: time="2022-10-22T21:22:02.525046501Z" level=info msg="shim disconnected" id=35f885360294c71ffb8bbf7abd60573f6326c3932b49e0c154b109c7c24f13c8
Oct 22 21:22:02 server dockerd-rootless.sh[20598]: time="2022-10-22T21:22:02.525292098Z" level=warning msg="cleaning up after shim disconnected" id=35f885360294c71ffb8bbf7abd60573f6326c3932b49e0c154b109c7c24f13c8 namespace=moby
Oct 22 21:22:02 server dockerd-rootless.sh[20598]: time="2022-10-22T21:22:02.525315372Z" level=info msg="cleaning up dead shim"
Oct 22 21:22:02 server dockerd-rootless.sh[20598]: time="2022-10-22T21:22:02.537605236Z" level=warning msg="cleanup warnings time=\"2022-10-22T21:22:02Z\" level=info msg=\"starting signal loop\" namespace=moby pid=21399 runtime=io.containerd.runc.v2\n"
Oct 22 21:22:02 server kernel: [157295.975720] br-f1f18b1986ab: port 1(veth3c2f1ae) entered disabled state
Oct 22 21:22:02 server kernel: [157295.975769] veth559746d: renamed from eth0
Oct 22 21:22:02 server kernel: [157296.003871] br-6c0b88f8ba26: port 1(veth5577bc5) entered disabled state
Oct 22 21:22:02 server kernel: [157296.004728] device veth5577bc5 left promiscuous mode
Oct 22 21:22:02 server kernel: [157296.004737] br-6c0b88f8ba26: port 1(veth5577bc5) entered disabled state
Oct 22 21:22:02 server kernel: [157296.040443] br-f1f18b1986ab: port 1(veth3c2f1ae) entered disabled state
Oct 22 21:22:02 server kernel: [157296.041784] device veth3c2f1ae left promiscuous mode
Oct 22 21:22:02 server kernel: [157296.041798] br-f1f18b1986ab: port 1(veth3c2f1ae) entered disabled state
Oct 22 21:22:02 server kernel: [157296.075053] overlayfs: fs on '/home/ftl/.local/share/docker/overlay2/l/TAERJWKUASF2MHUZPFFCHPLTVS' does not support file handles, falling back to xino=off.
Oct 22 21:22:02 server kernel: [157296.077196] br-6c0b88f8ba26: port 1(veth2d92884) entered blocking state
Oct 22 21:22:02 server kernel: [157296.077203] br-6c0b88f8ba26: port 1(veth2d92884) entered disabled state
Oct 22 21:22:02 server kernel: [157296.077298] device veth2d92884 entered promiscuous mode
Oct 22 21:22:02 server kernel: [157296.077418] br-6c0b88f8ba26: port 1(veth2d92884) entered blocking state
Oct 22 21:22:02 server kernel: [157296.077422] br-6c0b88f8ba26: port 1(veth2d92884) entered forwarding state
Oct 22 21:22:02 server systemd[20525]: Stopped libcontainer container 9ab8f94852ccc241c0245cfb63c39ec2a37be80b72d2c3696485eddc3ec4498b.
Oct 22 21:22:02 server systemd[20525]: docker-9ab8f94852ccc241c0245cfb63c39ec2a37be80b72d2c3696485eddc3ec4498b.scope: Consumed 2.693s CPU time.
Oct 22 21:22:02 server dockerd-rootless.sh[20582]: time="2022-10-22T21:22:02.716530097Z" level=info msg="ignoring event" container=9ab8f94852ccc241c0245cfb63c39ec2a37be80b72d2c3696485eddc3ec4498b module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Oct 22 21:22:02 server dockerd-rootless.sh[20598]: time="2022-10-22T21:22:02.717027184Z" level=info msg="shim disconnected" id=9ab8f94852ccc241c0245cfb63c39ec2a37be80b72d2c3696485eddc3ec4498b
Oct 22 21:22:02 server dockerd-rootless.sh[20598]: time="2022-10-22T21:22:02.717071835Z" level=warning msg="cleaning up after shim disconnected" id=9ab8f94852ccc241c0245cfb63c39ec2a37be80b72d2c3696485eddc3ec4498b namespace=moby
Oct 22 21:22:02 server dockerd-rootless.sh[20598]: time="2022-10-22T21:22:02.717081664Z" level=info msg="cleaning up dead shim"
Oct 22 21:22:02 server dockerd-rootless.sh[20598]: time="2022-10-22T21:22:02.735374132Z" level=warning msg="cleanup warnings time=\"2022-10-22T21:22:02Z\" level=info msg=\"starting signal loop\" namespace=moby pid=21419 runtime=io.containerd.runc.v2\n"
Oct 22 21:22:02 server kernel: [157296.233281] br-6c0b88f8ba26: port 1(veth2d92884) entered disabled state
Oct 22 21:22:02 server kernel: [157296.233592] br-43a6ccd96e0c: port 1(vethfcc4cf7) entered disabled state
Oct 22 21:22:02 server kernel: [157296.233818] vetheb0af2d: renamed from eth0
Oct 22 21:22:02 server kernel: [157296.267904] br-6c0b88f8ba26: port 1(veth2d92884) entered disabled state
Oct 22 21:22:02 server kernel: [157296.269168] device veth2d92884 left promiscuous mode
Oct 22 21:22:02 server kernel: [157296.269182] br-6c0b88f8ba26: port 1(veth2d92884) entered disabled state
Oct 22 21:22:02 server kernel: [157296.300040] br-43a6ccd96e0c: port 1(vethfcc4cf7) entered disabled state
Oct 22 21:22:02 server kernel: [157296.300913] device vethfcc4cf7 left promiscuous mode
Oct 22 21:22:02 server kernel: [157296.300922] br-43a6ccd96e0c: port 1(vethfcc4cf7) entered disabled state
Oct 22 21:22:02 server dockerd-rootless.sh[20582]: time="2022-10-22T21:22:02.888208586Z" level=error msg="6c5c11a84ec88d046d69cc74f570ab90be7d629b5e0311a1f13052ac8b0ea819 cleanup: failed to delete container from containerd: no such container"
Oct 22 21:22:02 server dockerd-rootless.sh[20582]: time="2022-10-22T21:22:02.893512172Z" level=error msg="restartmanger wait error: Could not mount \"/run/user/1000/docker.sock\" to container while the daemon is shutting down"
Oct 22 21:22:02 server dockerd-rootless.sh[20582]: time="2022-10-22T21:22:02.893525173Z" level=error msg="Error sending stop (signal 15) to container" container=6c5c11a84ec88d046d69cc74f570ab90be7d629b5e0311a1f13052ac8b0ea819 error="Container 6c5c11a84ec88d046d69cc74f570ab90be7d629b5e0311a1f13052ac8b0ea819 is not running"
Oct 22 21:22:02 server dockerd-rootless.sh[20582]: time="2022-10-22T21:22:02.893737165Z" level=info msg="Container failed to exit within 2s of signal 15 - using the force" container=6c5c11a84ec88d046d69cc74f570ab90be7d629b5e0311a1f13052ac8b0ea819
Oct 22 21:22:02 server dockerd-rootless.sh[20582]: time="2022-10-22T21:22:02.893799417Z" level=error msg="Error killing the container" container=6c5c11a84ec88d046d69cc74f570ab90be7d629b5e0311a1f13052ac8b0ea819 error="Container 6c5c11a84ec88d046d69cc74f570ab90be7d629b5e0311a1f13052ac8b0ea819 is not running"
Oct 22 21:22:02 server dockerd-rootless.sh[20582]: time="2022-10-22T21:22:02.893834565Z" level=error msg="failed to shut down container" container=6c5c11a84ec88d046d69cc74f570ab90be7d629b5e0311a1f13052ac8b0ea819 error="Failed to stop container 6c5c11a84ec88d046d69cc74f570ab90be7d629b5e0311a1f13052ac8b0ea819 with error: Container 6c5c11a84ec88d046d69cc74f570ab90be7d629b5e0311a1f13052ac8b0ea819 is not running"
Oct 22 21:22:03 server systemd[20525]: Stopped libcontainer container 8269a937c9065c37667713326dc77aa77d2c24015bda1eae700514384232fadb.
Oct 22 21:22:03 server systemd[20525]: docker-8269a937c9065c37667713326dc77aa77d2c24015bda1eae700514384232fadb.scope: Consumed 9.757s CPU time.
Oct 22 21:22:03 server systemd[20525]: Removed slice Slice /user.
Oct 22 21:22:03 server systemd[20525]: user.slice: Consumed 16.217s CPU time.
Oct 22 21:22:03 server dockerd-rootless.sh[20582]: time="2022-10-22T21:22:03.561853619Z" level=info msg="ignoring event" container=8269a937c9065c37667713326dc77aa77d2c24015bda1eae700514384232fadb module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
Oct 22 21:22:03 server dockerd-rootless.sh[20598]: time="2022-10-22T21:22:03.562513641Z" level=info msg="shim disconnected" id=8269a937c9065c37667713326dc77aa77d2c24015bda1eae700514384232fadb
Oct 22 21:22:03 server dockerd-rootless.sh[20598]: time="2022-10-22T21:22:03.562591681Z" level=warning msg="cleaning up after shim disconnected" id=8269a937c9065c37667713326dc77aa77d2c24015bda1eae700514384232fadb namespace=moby
Oct 22 21:22:03 server dockerd-rootless.sh[20598]: time="2022-10-22T21:22:03.562630970Z" level=info msg="cleaning up dead shim"
Oct 22 21:22:03 server dockerd-rootless.sh[20598]: time="2022-10-22T21:22:03.588505610Z" level=warning msg="cleanup warnings time=\"2022-10-22T21:22:03Z\" level=info msg=\"starting signal loop\" namespace=moby pid=21440 runtime=io.containerd.runc.v2\n"
Oct 22 21:22:03 server kernel: [157297.022519] br-f1f18b1986ab: port 2(veth38fc9f3) entered disabled state
Oct 22 21:22:03 server kernel: [157297.022573] vethc8f0ea3: renamed from eth0
Oct 22 21:22:03 server kernel: [157297.066772] br-f1f18b1986ab: port 2(veth38fc9f3) entered disabled state
Oct 22 21:22:03 server kernel: [157297.067494] device veth38fc9f3 left promiscuous mode
Oct 22 21:22:03 server kernel: [157297.067501] br-f1f18b1986ab: port 2(veth38fc9f3) entered disabled state
Oct 22 21:22:03 server kernel: [157297.109055] br-43a6ccd96e0c: port 2(veth992689d) entered disabled state
Oct 22 21:22:03 server kernel: [157297.109212] veth4c59cff: renamed from eth1
Oct 22 21:22:03 server kernel: [157297.160885] br-43a6ccd96e0c: port 2(veth992689d) entered disabled state
Oct 22 21:22:03 server kernel: [157297.161800] device veth992689d left promiscuous mode
Oct 22 21:22:03 server kernel: [157297.161810] br-43a6ccd96e0c: port 2(veth992689d) entered disabled state
Oct 22 21:22:03 server dockerd-rootless.sh[20582]: time="2022-10-22T21:22:03.797241472Z" level=info msg="stopping event stream following graceful shutdown" error="<nil>" module=libcontainerd namespace=moby
Oct 22 21:22:03 server dockerd-rootless.sh[20582]: time="2022-10-22T21:22:03.799032198Z" level=info msg="Daemon shutdown complete"
Oct 22 21:22:03 server dockerd-rootless.sh[20582]: time="2022-10-22T21:22:03.799430835Z" level=info msg="stopping event stream following graceful shutdown" error="context canceled" module=libcontainerd namespace=plugins.moby
Oct 22 21:22:03 server dockerd-rootless.sh[20582]: time="2022-10-22T21:22:03.799474518Z" level=info msg="stopping healthcheck following graceful shutdown" module=libcontainerd
Oct 22 21:22:03 server systemd[20525]: Stopped Docker Application Container Engine (Rootless).
Oct 22 21:22:03 server systemd[20525]: docker.service: Consumed 7.416s CPU time.
Oct 22 21:22:03 server systemd[20525]: Stopped target Basic System.
Oct 22 21:22:03 server systemd[20525]: Stopped target Paths.
Oct 22 21:22:03 server systemd[20525]: Stopped target Sockets.
Oct 22 21:22:03 server systemd[20525]: Stopped target Timers.
Oct 22 21:22:03 server systemd[20525]: Closed D-Bus User Message Bus Socket.
Oct 22 21:22:03 server systemd[20525]: Closed GnuPG network certificate management daemon.
Oct 22 21:22:03 server systemd[20525]: Closed GnuPG cryptographic agent and passphrase cache (access for web browsers).
Oct 22 21:22:03 server systemd[20525]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
Oct 22 21:22:03 server systemd[20525]: Closed GnuPG cryptographic agent (ssh-agent emulation).
Oct 22 21:22:03 server systemd[20525]: Closed GnuPG cryptographic agent and passphrase cache.
Oct 22 21:22:03 server systemd[20525]: Closed debconf communication socket.
Oct 22 21:22:03 server systemd[20525]: Closed REST API socket for snapd user session agent.
Oct 22 21:22:03 server systemd[20525]: Removed slice User Application Slice.
Oct 22 21:22:03 server systemd[20525]: app.slice: Consumed 7.435s CPU time.
Oct 22 21:22:03 server systemd[20525]: Reached target Shutdown.
Oct 22 21:22:03 server systemd[20525]: Finished Exit the Session.
Oct 22 21:22:03 server systemd[20525]: Reached target Exit the Session.
Oct 22 21:22:03 server systemd[1]: [email protected]: Deactivated successfully.
Oct 22 21:22:03 server systemd[1]: Stopped User Manager for UID 1000.
Oct 22 21:22:03 server systemd[1]: [email protected]: Consumed 23.788s CPU time.
Oct 22 21:22:03 server systemd[1]: Stopping User Runtime Directory /run/user/1000...
Oct 22 21:22:03 server systemd[1]: run-user-1000.mount: Deactivated successfully.
Oct 22 21:22:03 server systemd[1]: [email protected]: Deactivated successfully.
Oct 22 21:22:03 server systemd[1]: Stopped User Runtime Directory /run/user/1000.
Oct 22 21:22:03 server systemd[1]: Removed slice User Slice of UID 1000.
Oct 22 21:22:03 server systemd[1]: user-1000.slice: Consumed 24.844s CPU time.
Oct 22 21:45:16 server canonical-livepatch.canonical-livepatchd[626]: Client information is recent, not refreshing.
Oct 22 21:47:27 server systemd[1]: Created slice User Slice of UID 1000.
Oct 22 21:47:27 server systemd[1]: Starting User Runtime Directory /run/user/1000...
Oct 22 21:47:27 server systemd[1]: Finished User Runtime Directory /run/user/1000.
Oct 22 21:47:27 server systemd[1]: Starting User Manager for UID 1000...
Oct 22 21:47:27 server systemd[21471]: Queued start job for default target Main User Target.
Oct 22 21:47:27 server systemd[21471]: Created slice User Application Slice.
Oct 22 21:47:27 server systemd[21471]: Reached target Paths.
Oct 22 21:47:27 server systemd[21471]: Reached target Timers.
Oct 22 21:47:27 server systemd[21471]: Starting D-Bus User Message Bus Socket...

相关内容