设置实时修补通道
每次更新完整的内核软件包后都需要重引导。因此,必须确保使用实时修补的客户端在它们所指派到的通道中没有可用的更新内核。使用实时修补的客户端包含实时修补通道中正在运行的内核的更新。
可通过两种方式管理实时修补通道:
使用内容生命周期管理克隆产品树,并去除比正在运行的版本更新的内核版本。administration:content-lifecycle-examples.adoc#enhance-project-with-livepatching 中介绍了此过程。这是建议的解决方法。
或者,可以使用 spacewalk-manage-channel-lifecycle 工具。此过程更偏向于手动操作,需要使用命令行工具以及 Web UI。本节针对 SLES 15 SP5 介绍了此过程,但内容同样适用于 SLE 12 SP4 或更高版本。
1. 为实时修补使用 spacewalk-manage-channel-lifecycle
|
spacewalk-manage-channel-lifecycle 已弃用,并将在后续版本中去除。建议用户改用功能更丰富且受官方支持的内容生命周期管理 (CLM) API。 |
Cloned vendor channels should be prefixed by dev for development, testing, or prod for production. In this procedure, you create a dev cloned channel and then promote the channel to testing.
-
在客户端上的命令提示符下,以 root 身份获取当前软件包通道树:
# spacewalk-manage-channel-lifecycle --list-channels Spacewalk Username: admin Spacewalk Password: Channel tree: 1. sles15-sp7-pool-x86_64 \__ sle-live-patching15-pool-x86_64-sp7 \__ sle-live-patching15-updates-x86_64-sp7 \__ sle-manager-tools15-pool-x86_64-sp7 \__ sle-manager-tools15-updates-x86_64-sp7 \__ sles15-sp7-updates-x86_64 -
Use the
spacewalk-manage-channelcommand with theinitargument to automatically create a new development clone of the original vendor channel:spacewalk-manage-channel-lifecycle --init -c sles15-sp7-pool-x86_64
-
Check that
dev-sles15-sp7-updates-x86_64is available in your channel list.
Check the dev cloned channel you created, and remove any kernel updates that require a reboot.
-
Check the current kernel version by selecting the client from , and taking note of the version displayed in the
Kernelfield. -
In the SUSE Multi-Linux Manager Web UI, select the client from , navigate to the tab, and select
dev-sles15-sp7-updates-x86_64. Navigate to thePatchestab, and click List/Remove Patches. -
In the search bar, type
kerneland identify the kernel version that matches the kernel currently used by your client. -
去除所有比当前安装的内核更新的内核版本。
Your channel is now set up for live patching, and can be promoted to testing. In this procedure, you also add the live patching child channels to your client, ready to be applied.
-
At the command prompt on the client, as
root, promote and clone thedev-sles15-sp7-pool-x86_64channel to a newtestingchannel:# spacewalk-manage-channel-lifecycle --promote -c dev-sles15-sp7-pool-x86_64
-
在 SUSE Multi-Linux Manager Web UI 中,从中选择客户端,然后导航到选项卡。
-
Check the new
test-sles15-sp7-pool-x86_64custom channel to change the base channel, and check both corresponding live patching child channels. -
单击 下一步,确认细节正确,然后单击 确认 以保存更改。
现在可以选择和查看可用的 CVE 补丁,并通过实时修补应用这些重要的内核更新。