RHEL 9.8→10.2 Leapp 预检:ifcfg inhibitor 与报告解读
This content is not available in your language yet.
Leapp 的 preupgrade 是“体检”,不是升级。它把不兼容项分成 inhibitor(必须先清) 和 high/medium/low/info(要评估)。本页在 RHEL 9.8 上跑 9.8→10.2,先复现一个真实 inhibitor,再清掉它。
在 PVE 393 rhel9-lab(RHEL 9.8,192.168.2.235)上:
sudo dnf -y install leapp-upgradesudo leapp --versionsudo leapp preupgrade --target 10.2echo $?E3 记录:plans/content-expansion/evidence/rhel/rhel-leapp-precheck/run.json(7 步,含两次 preupgrade 的计数与报告片段)。
先给结论:preupgrade 只体检
Section titled “先给结论:preupgrade 只体检”| 结果 | 含义 |
|---|---|
rc=1 + Inhibitors: 1 | 有阻断项,必须先处理 |
rc=0 | 无 inhibitor,但 high/medium 仍要逐条评估 |
| 报告 | /var/log/leapp/leapp-report.txt / .json |
| answerfile | /var/log/leapp/answerfile,需要确认的项写这里 |
--target 10.2 指定目标 minor;不写则用默认目标版本。
第一次:rc1 + ifcfg inhibitor
Section titled “第一次:rc1 + ifcfg inhibitor”Inhibitors: 1HIGH severity reports: 1MEDIUM severity reports: 1LOW severity reports: 1INFO severity reports: 3报告里的 inhibitor:
Risk Factor: high (inhibitor)Title: Legacy network configuration foundSummary: Network configuration files in legacy "ifcfg" format are present.In Red Hat Enterprise Linux 10, support for these files is no longer enabled ... - /etc/sysconfig/network-scripts/ifcfg-eth0Remediation: [hint] Convert the configuration into NetworkManager native "keyfile" format.[command] nmcli connection migrate /etc/sysconfig/network-scripts/ifcfg-eth0这是 9→10 最常见的阻断之一:RHEL 10 不再读 ifcfg,必须先迁到 keyfile。
迁移 ifcfg → keyfile
Section titled “迁移 ifcfg → keyfile”sudo nmcli connection migrate /etc/sysconfig/network-scripts/ifcfg-eth0# Connection 'System eth0' (...) successfully migrated.ls /etc/NetworkManager/system-connections/# System eth0.nmconnectionip -br a show eth0# eth0 UP 192.168.2.235/24 ...ip route | head -1# default via 192.168.2.2 dev eth0 ...迁移后 IP/默认路由不变,SSH 不断。再跑一次:
sudo leapp preupgrade --target 10.2echo $? # 0第二次:rc0 但仍有 high/medium
Section titled “第二次:rc0 但仍有 high/medium”HIGH and MEDIUM severity reports:1. GRUB2 core will be automatically updated during the upgrade2. Failed to read GPG keys from provided key files3. Berkeley DB (libdb) has been detected on your system- GRUB2 core:BIOS 系统升级时会跑
grub2-install,升级后要检查 GRUB 配置; - GPG keys:报告读不到提供的 key 文件,升级前要核对 target repo 的 GPG;
- libdb:RHEL 10 不再包含 libdb,依赖它的应用要先迁移数据(
db_converter只在 RHEL 9 有)。
rc=0 只代表“没有 inhibitor”,不代表“可以无脑升级”。
报告与 answerfile
Section titled “报告与 answerfile”ls -l /var/log/leapp/leapp-report.txt /var/log/leapp/leapp-report.jsonls -l /var/log/leapp/answerfileanswerfile 里是需要人工确认的项(如是否继续、是否启用某 repo);leapp answer 写入后再 preupgrade,直到 inhibitor 清零。
-
leapp --version与目标 minor 匹配; - preupgrade 的 inhibitor 数为 0;
- ifcfg 已迁 keyfile(或确认不再使用);
- GRUB2/GPG/libdb 报告逐条有结论;
- answerfile 已填并复核;
- 升级前有快照/备份/回退方案。
未实测与边界
Section titled “未实测与边界”- 未执行
leapp upgrade实际升级; - 未测试 target repo 的 GPG key 导入;
- 未测试 libdb 数据转换(db_converter);
- 未测试升级后的 SELinux relabel 与回滚。
- RHEL 版本停留:release pin 与 EUS 仓库 — 升级前版本策略
- RHEL 10 采用评估 — 目标版本差异
- 官方:Upgrading from RHEL 9 to RHEL 10