9.2. 故障排除窍门

您可以参考以下故障排除信息。

预升级阶段

  • 验证您的系统是否满足 规划一个升级 中列出的所有条件。
  • 请确定您遵循了 准备升级 中描述的所有步骤,例如:您的系统没有使用多个网络接口卡(NIC),它们的名称基于内核使用的前缀(eth)。
  • 确保您已回答了 /var/log/leapp/answerfile 文件中 Leapp 所需的所有问题。如果缺少回答,Leapp 会阻止升级。例如:

    • 系统中没有 VDO 设备?
  • 请确定您解决了在预升级报告(位于 /var/log/leapp/leapp-report.txt )中发现的所有问题。您也可以使用 web 控制台来达到此目的,如评估可升级性并通过 web 控制台应用自动化修复中所述。

例 9.1. Leapp answerfile

以下是一个未编辑的 /var/log/leapp/answerfile 文件,它有一个未回答的问题:

[check_vdo]
# Title:              None
# Reason:             Confirmation
# ============================= check_vdo.confirm =============================
# Label:              Are all VDO devices, if any, successfully converted to LVM management?
# Description:        Enter True if no VDO devices are present on the system or all VDO devices on the system have been successfully converted to LVM management. Entering True will circumvent check of failures and undetermined devices. Recognized VDO devices that have not been converted to LVM management can still block the upgrade despite the answer.All VDO devices must be converted to LVM management before upgrading.
# Reason:             To maximize safety all block devices on a system that meet the criteria as possible VDO devices are checked to verify that, if VDOs, they have been converted to LVM management. If the devices are not converted and the upgrade proceeds the data on unconverted VDO devices will be inaccessible. In order to perform checking the 'vdo' package must be installed. If the 'vdo' package is not installed and there are any doubts the 'vdo' package should be installed and the upgrade process re-run to check for unconverted VDO devices. If the check of any device fails for any reason an upgrade inhibiting report is generated. This may be problematic if devices are dynamically removed from the system subsequent to having been identified during device discovery. If it is certain that all VDO devices have been successfully converted to LVM management this dialog may be answered in the affirmative which will circumvent block device checking.
# Type:               bool
# Default:            None
# Available choices: True/False
# Unanswered question. Uncomment the following line with your answer
# confirm =

Label 字段指定需要回答的问题。在本例中,问题是 Are all VDO devices, if any, successfully converted to LVM management?

要回答问题,请取消对最后一行的注释并输入回答 TrueFalse。在本例中,所选答案为 True

[check_vdo]
...
# Available choices: True/False
# Unanswered question. Uncomment the following line with your answer
confirm = True

下载阶段

  • 如果在下载 RPM 软件包时出现问题,请检查位于 /var/log/leapp/dnf-debugdata/ 目录的事务调试数据。

    注意

    如果没有生成事务调试数据,/var/log/leapp/dnf-debugdata/ 目录为空,则不存在。当所需的软件仓库不可用时,会出现这种情况。

initramfs 阶段

  • 在此阶段,潜在的故障会进入 Dracut shell。检查 Journal 日志:

    # journalctl

    或者,使用 reboot 命令从 Dracut shell 重启系统,并检查 /var/log/leapp/leapp-upgrade.log 文件。

升级后阶段

  • 如果您的系统看上去成功升级,但是使用旧的 RHEL 8 内核引导,重启系统并检查 GRUB 中默认条目的内核版本。
  • 确保您已遵循了 验证升级后状态 中推荐的步骤。
  • 如果您的应用程序或服务在您将 SELinux 切换到 enforcing 模式后停止工作或者行为不正确,请使用 ausearch, journalctl, 或 dmesg 检查拒绝:

    # ausearch -m AVC,USER_AVC -ts boot
    # journalctl -t setroubleshoot
    # dmesg | grep -i -e selinux -e type=1400

    最常见的问题是由错误的标记造成的。更多详情请参阅SELinux 故障排除