適用於:✔️ Linux VM
在 Red Hat Enterprise Linux (RHEL) 執行重大升級時,必須將一個主要版本轉換為另一個主要版本,例如從 RHEL 7 轉換為 RHEL 8 或從 RHEL 8 轉換為 RHEL 9。 主要升級伴隨重大變更,包括新功能、增強功能,以及安全性和效能的改善。 此流程可能相當複雜,但 Red Hat 提供工具和指導,可簡化並精簡升級流程。
其中一個範例是 Leapp 工具。 Leapp 工具的設計目的是將 RHEL 系統的升級程式自動化至下一個主要版本。 它會執行檢查、提供建議,並協助解決升級期間發生的任何問題。 本文討論如何在 Red Hat作系統的主要升級期間使用 Leapp 工具時所發生的常見問題進行疑難解答。
警告
2024 年 6 月 30 日,Red Hat Enterprise Linux 7 已終止維護支援 2 個階段。 維護階段後面接著為延長生命階段。 當 Red Hat Enterprise Linux 7 從完整和維護階段轉換時,您應該升級至 Red Hat Enterprise Linux 8 或 9。 如果您必須留在 Red Hat Enterprise Linux 7 上,建議您新增 Red Hat Enterprise Linux 延伸生命週期支援 (ELS) 附加元件。
升級前的建議
開始 Leapp 預升級和升級程式之前,請確定您採取下列動作:
建立虛擬機 (VM) 或 OS 磁碟快照集的備份。
在中
/var/lib/leapp
清除足夠的空間以容納升級。 最佳做法是至少有 2-5 GB 的可用空間可用。設定序列主控台的存取權。
完成這些工作之後,您可以透過序列控制台啟動 Leapp 預升級和升級程式。
抑制問題和錯誤
抑制性問題 是預先升級評估期間識別的特定問題,可防止升級繼續進行。 這些問題很重要,必須先解決,才能繼續進行升級。 您必須消除抑制問題,以在升級期間和之後維護系統的穩定性和功能。
錯誤 是指在升級程式期間可能發生的問題,這些問題可能會導致中斷或失敗。 這些錯誤可能會在不同的階段發生,無論是在升級前檢查期間還是實際升級期間。
常見的抑製劑類型
抑製劑類型 | 描述 |
---|---|
不支援的套件 | 安裝在目標版本中無法使用或不支援之目前系統上的套件 |
不相容的硬體 | 目標版本中不支援的硬體元件 |
設定問題 | 與新版本不相容且需要調整的系統組態 |
第三方軟體 | 可能會干擾升級程式的非 Red Hat 軟體 |
檔系統配置 | 涉及 OS 檔案系統配置的問題,例如目標版本不支援的數據分割配置 |
網路變更 | 必須更新以符合新版本網路堆疊的網路組態 |
自訂指令碼 | 可能與新版本不相容的自定義腳本或cron作業 |
常見的錯誤類型
錯誤類型 | 描述 |
---|---|
安裝失敗 | 在升級期間安裝套件時發生的錯誤 |
服務失敗 | 升級程式期間未正確啟動或停止的服務 |
檔系統問題 | 涉及磁碟空間、檔案損毀或裝入點的問題 |
網路問題 | 影響下載或安裝套件的網路連線問題 |
在 Leapp 報告中尋找抑製劑或錯誤
Leapp 報表位於 /var/log/leapp/leapp-report.txt
。 開啟報告,並尋找標示為抑制物的區段。 這些區段列出必須解決的問題。
針對每個抑制因素,報告通常會提供詳細的補救步驟。 這些步驟可以包含要執行的命令、要安裝的套件,或進行組態變更。
下列清單包含描述抑製劑及其補救的常見輸出:
抑製劑輸出 1
Inhibitor: Missing package 'pkg_name' required for upgrade. Remediation: Install the missing package by running: [command] sudo yum install pkg_name
抑製劑輸出 2
Risk Factor: high (inhibitor) Title: Possible problems with remote login using root account Summary: OpenSSH configuration file does not explicitly state the option PermitRootLogin in sshd_config file, which will default in RHEL8 to "prohibit-password". Remediation: [hint] If you depend on remote root logins using passwords, consider setting up a different user for remote administration or adding "PermitRootLogin yes" to sshd_config. If this change is ok for you, add explicit "PermitRootLogin prohibit-password" to your sshd_config to ignore this inhibitor
抑製劑輸出 3
Risk Factor: high (inhibitor) Title: Missing required answers in the answer file Summary: One or more sections in answerfile are missing user choices: remove_pam_pkcs11_module_check.confirm For more information consult https://red.ht/leapp-dialogs. Remediation: [hint] Please register user choices with leapp answer cli command or by manually editing the answerfile. [command] leapp answer --section remove_pam_pkcs11_module_check.confirm=True
抑製劑輸出 4
Risk Factor: high (inhibitor) Title: Use of CIFS detected. Upgrade can't proceed Summary: CIFS is currently not supported by the inplace upgrade. Remediation: [hint] Comment out CIFS entries to proceed with the upgrade.
抑製劑輸出 5
Risk Factor: high (inhibitor) Title: Detected loaded kernel drivers which have been removed in RHEL 8. Upgrade cannot proceed. Summary: Support for the following RHEL 7 device drivers has been removed in RHEL 8: pata_acpi floppy Remediation: blocklist modules that are unsupported in RHEL 8 (floppy and pata_acpi) or unload the modules by running [command] sudo rmmod floppy pata_acpi
抑製劑輸出 6
Risk Factor: high (inhibitor) Title: Btrfs has been removed from RHEL8 Summary: The Btrfs file system was introduced as Technology Preview with the initial release of Red Hat Enterprise Linux 6 and Red Hat Enterprise Linux 7. As of versions 6.6 and 7.4 this technology has been deprecated and removed in RHEL8. Remediation: If filesystem is currently mounted with BTRFS proceed with fresh reinstallation as it is no longer supported on Red Hat Enterprise Linux 8 If any btrfs is not currently in use by any filesystem, remove the btrfs module using the [command] modprobe -rv btrfs
抑製劑輸出 7
Inhibitor: Newest installed kernel not in use Remediation: If the system is having the latest RHEL7 kernel installed, take a reboot and boot the system from the latest kernel. If the system is NOT having the latest RHEL7 kernel installed, install it using [command] yum install <latest kernel package>
抑製劑輸出 8
Risk Factor: high (inhibitor) Title: Multiple devel kernels installed Summary: DNF cannot produce a valid upgrade transaction when multiple kernel-devel packages are installed. Remediation: [hint] Remove all but one kernel-devel packages before running Leapp again. [command] yum -y remove kernel-devel-X.XX.X-XXX.XXX kernel-devel-X.XX.X-XXXX.XXX.X.XXX
抑製劑輸出 9
Risk Factor: medium (inhibitor) Title: A YUM/DNF repository defined multiple times Summary: The following repositories are defined multiple times inside the "upgrade" container: - repo-id Remediation: [hint] Remove the duplicate repository definitions or change repoids of conflicting repositories on the system to prevent the conflict
抑製劑輸出 10
Risk Factor: high (inhibitor) Title: Firewalld Configuration AllowZoneDrifting Is Unsupported Summary: Firewalld has enabled configuration option "AllowZoneDrifiting" which has been removed in RHEL-9. New behavior is as if "AllowZoneDrifiting" was set to "no". Related links: - Changes in firewalld related to Zone Drifting: https://access.redhat.com/articles/4855631 Remediation: [hint] Set AllowZoneDrifting=no in /etc/firewalld/firewalld.conf [command] sed -i s/^AllowZoneDrifting=.*/AllowZoneDrifting=no/ /etc/firewalld/firewalld.conf
注意事項
仔細檢查整個預畢業報告,即使它沒有列出任何抑製劑。 此報表會提供升級之前要採取的建議動作,以便系統在之後正確運作。
修正所有抑制物之後,請再次執行預降級檢查,以確定所有問題都已解決。
Leapp Preupgrade 常見問題
升級前徵兆 1:損毀或遺失 urllib3 連結庫
Python 中損毀或遺失 的 urllib3 連結庫會產生下列錯誤訊息:
Traceback (most recent call last):
File "/bin/leapp", line 9, in <module>
load_entry_point('leapp==0.16.0', 'console_scripts', 'leapp')()
File "/usr/lib/python2.7/site-packages/leapp/cli/__init__.py", line 43, in main
_load_commands(cli.command)
File "/usr/lib/python2.7/site-packages/leapp/cli/__init__.py", line 27, in _load_commands
package = pkgutil.get_loader(package_name).load_module(package_name)
File "/usr/lib64/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/usr/lib/python2.7/site-packages/leapp/cli/commands/list_runs/__init__.py", line 6, in <module>
from leapp.cli.commands.upgrade.util import fetch_all_upgrade_contexts
File "/usr/lib/python2.7/site-packages/leapp/cli/commands/upgrade/__init__.py", line 9, in <module>
from leapp.logger import configure_logger
File "/usr/lib/python2.7/site-packages/leapp/logger/__init__.py", line 10, in <module>
from leapp.utils.actorapi import get_actor_api, RequestException
File "/usr/lib/python2.7/site-packages/leapp/utils/actorapi.py", line 4, in <module>
import requests
File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 58, in <module>
from . import utils
File "/usr/lib/python2.7/site-packages/requests/utils.py", line 32, in <module>
from .exceptions import InvalidURL
File "/usr/lib/python2.7/site-packages/requests/exceptions.py", line 10, in <module>
from urllib3.exceptions import HTTPError as BaseHTTPError
ImportError: No module named urllib3.exceptions
升級前解決方案 1:重新安裝 python-urllib3 套件
執行下列命令來重新安裝 python-urllib3 套件:
sudo mv /usr/lib/python2.7/site-packages/urllib3 /tmp/
sudo yum reinstall python-urllib3
升級前徵兆 2:連線在 30,001 毫秒後逾時
Red Hat Update Infrastructure (RHUI) IP 位址的通訊區塊會產生下列錯誤訊息:
Risk Factor: high (error)
Title: Actor rpm_scanner unexpectedly terminated with exit code: 1
Summary: Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 74, in _do_run
actor_instance.run(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 289, in run
self.process(*args)
File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/rpmscanner/actor.py", line 20, in process
rpmscanner.process()
File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/rpmscanner/libraries/rpmscanner.py", line 110, in process
pkg_repos = get_package_repository_data()
File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/rpmscanner/libraries/rpmscanner.py", line 77, in get_package_repository_data
return _get_package_repository_data_yum()
File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/rpmscanner/libraries/rpmscanner.py", line 31, in _get_package_repository_data_yum
for pkg in yum_base.doPackageLists().installed:
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 2981, in doPackageLists
avail = self.pkgSack.returnNewestByNameArch(patterns=patterns,
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1075, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 778, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.7/site-packages/yum/repos.py", line 347, in populateSack
self.doSetup()
File "/usr/lib/python2.7/site-packages/yum/repos.py", line 157, in doSetup
self.retrieveAllMD()
File "/usr/lib/python2.7/site-packages/yum/repos.py", line 88, in retrieveAllMD
dl = repo._async and repo._commonLoadRepoXML(repo)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1482, in _commonLoadRepoXML
result = self._getFileRepoXML(local, text)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1259, in _getFileRepoXML
size=102400) # setting max size as 100K
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1042, in _getFile
raise e
NoMoreMirrorsRepoError: failure: repodata/repomd.xml from rhel-7-server-ansible-2-rhui-rpms: [Errno 256] No more mirrors to try.
https://rhui4-1.microsoft.com/pulp/repos/content/dist/rhel/rhui/server/7/7Server/x86_64/ansible/2/os/repodata/repomd.xml: [Errno 12] Timeout on https://rhui4-1.microsoft.com/pulp/repos/content/dist/rhel/rhui/server/7/7Server/x86_64/ansible/2/os/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
https://rhui4-1.microsoft.com/pulp/repos/content/dist/rhel/rhui/server/7/7Server/x86_64/ansible/2/os/repodata/repomd.xml: [Errno 12] Timeout on https://rhui4-1.microsoft.com/pulp/repos/content/dist/rhel/rhui/server/7/7Server/x86_64/ansible/2/os/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
https://rhui4-1.microsoft.com/pulp/repos/content/dist/rhel/rhui/server/7/7Server/x86_64/ansible/2/os/repodata/repomd.xml: [Errno 12] Timeout on https://rhui4-1.microsoft.com/pulp/repos/content/dist/rhel/rhui/server/7/7Server/x86_64/ansible/2/os/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
https://rhui4-1.microsoft.com/pulp/repos/content/dist/rhel/rhui/server/7/7Server/x86_64/ansible/2/os/repodata/repomd.xml: [Errno 12] Timeout on https://rhui4-1.microsoft.com/pulp/repos/content/dist/rhel/rhui/server/7/7Server/x86_64/ansible/2/os/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
https://rhui4-1.microsoft.com/pulp/repos/content/dist/rhel/rhui/server/7/7Server/x86_64/ansible/2/os/repodata/repomd.xml: [Errno 12] Timeout on https://rhui4-1.microsoft.com/pulp/repos/content/dist/rhel/rhui/server/7/7Server/x86_64/ansible/2/os/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
升級前解決方案 2:允許 RHUI 連線
允許與 RHUI 的連線。 如需詳細資訊,請參閱 Linux RHUI 連線問題。
升級前徵兆 3:訂用帳戶管理員命令未執行
如果您在隨用隨付映射上執行具有 Red Hat 訂用帳戶管理員的 Leapp 升級,您可能會收到下列錯誤訊息:
[ERROR] Actor: scan_subscription_manager_info
Message:
Summary:
Details: Command ['subscription-manager', 'release'] failed with exit code 1.
Stderr: This system is not yet registered. Try 'subscription-manager register --help' for more information.
Hint: Please ensure you have a valid RHEL subscription and your network is up. If you are using proxy for Red Hat subscription-manager, please make sure it is specified inside the /etc/rhsm/rhsm.conf file. Or use the --no-rhsm option when running leapp, if you do not want to use subscription-manager for the in-place upgrade and you want to deliver all target repositories by yourself or using RHUI on public cloud.
預先升級解決方案 3:略過訂用帳戶管理員工具
當您在 Azure 上使用 PayGo 映射時,無法執行 subscription-manager
此工具,因為系統設計為改用 RHUI。 您必須指定要 --no-rhsm
在升級期間略過 subscription-manager
的旗標。
preupgrade 徵兆 4:Leapp preupgrade 不會安裝 RHEL 8 userspace 套件 (“execv() 失敗:沒有這類檔案或目錄”)
如果您執行 Leapp 預升級,您可能會收到下列「無法安裝 RHEL 8 userspace 套件」錯誤訊息:
Risk Factor: high
Title: Unable to install RHEL 8 userspace packages.
Summary: {"details": "DNF failed to install userspace packages, likely due to the proxy config
uration detected in a repository configuration file.", "stderr": "Failed to create directory /
var/lib/leapp/scratch/mounts/root_/system_overlay//sys/fs/selinux: Read-only file system
Failed to create directory /var/lib/leapp/scratch/mounts/root_/system_overlay//sys/fs/selinux:
Read-only file system
Host and machine ids are equal (35e06890bn8g56f798g8904356fsd5f8): refusing to link journals
execv() failed: No such file or directory
您也可以收到下列「無法取得 DNF 組態的相關資料」錯誤訊息:
Risk Factor: high
Title: Cannot obtain data about the DNF configuration
Summary: {"stderr": "Failed to retrieve machine ID: No such file or directory\n", "stdout": ""}
Key: b41a40f4129e340f05c6b14d1a850b626c4185d1
preupgrade 解決方案 4:安裝 dnf 套件
請確定 已安裝 dnf 套件,且沒有任何問題或損毀的檔案與該套件相關聯:
sudo package-cleanup --problems
Package leapp-upgrade-el7toel8-deps-0.18.0-1.el7_9.noarch has missing requires of dnf >= ('0', '4', None)
sudo yum reinstall leapp\*
sudo rpm -Va dnf\* leapp\*
.M....... g /var/log/dnf.librepo.log
.M....... g /var/log/dnf.log
.M....... g /var/log/dnf.rpm.log
.M....... g /var/log/hawkey.log
preupgrade 徵兆 5: /var/lib/leapp/el8userspace', '/bin/bash', '-c', 'su - -c update-ca-trust'] 失敗,結束代碼 1
如果您執行 Leapp 預降級,您可能會收到下列「動作專案target_userspace_creator意外終止」錯誤訊息:
Factor: high error
Title: Actor target_userspace_creator unexpectedly terminated with exit code: 1
Summary: Traceback most recent call last: File '/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py',
line 74, in _do_run actor_instance.run*args, **kwargs File '/usr/lib/python2.7/site-packages/leapp/actors/__init__.py', line 289, in run
self.process*args File '/usr/share/leapp-repository/repositories/system_upgrade/common/actors/targetuserspacecreator/actor.py', line 58, in process userspacegen.perform File '/usr/lib/python2.7/site-packages/leapp/utils/deprecation.py', line 42, in process_wrapper return target_item*args, **kwargs File '/usr/share/leapp-repository/repositories/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py',
line 1246, in perform _create_target_userspacecontext, indata, indata.packages, indata.files, target_repoids File '/usr/share/leapp-repository/repositories/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py',
line 1108, in _create_target_userspace _prep_repository_accesscontext, target_path File '/usr/share/leapp-repository/repositories/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py',
line 629, in _prep_repository_access run['chroot', target_userspace, '/bin/bash', '-c', 'su - -c update-ca-trust'] File '/usr/lib/python2.7/site-packages/leapp/libraries/stdlib/__init__.py', line 192, in run result=resultCalledProcessError: Command ['chroot', '/var/lib/leapp/el8userspace', '/bin/bash', '-c', 'su - -c update-ca-trust'] failed with exit code 1
升級前解決方案 5:重新安裝 CA 憑證並更新 CA 信任
導致update-ca-trust
命令失敗的現有ca憑證套件內發生問題。 若要修正此問題,請重新安裝 ca-certificates 套件並執行 update-ca-trust
命令:
sudo yum reinstall ca-certificates
sudo update-ca-trust
preupgrade 徵兆 6:FileNotFoundError: [Errno 2] 沒有這類檔案或目錄:'/etc/leapp/repos.d/system_upgrade/common/files/rhui/azure-XX/content-XX.crt'
如果您嘗試在 RHEL
8 上執行SAP-HANA
,或具有leapp
工具版本 ,SAPApps
或是在具有 版本leapp-rhui-azure-1.0.0-14.el8.noarch
lapp-rhui-azure-sap-1.0.0-14.el8.noarch
的基礎 Red Hat 映像上執行 leapp preupgrade
,則會產生下列錯誤訊息:
====> * target_userspace_creator
Initializes a directory to be populated as a minimal environment to run binaries from the target system.
Process Process-408:
Traceback (most recent call last):
File "/usr/lib64/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib64/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3.6/site-packages/leapp/repository/actor_definition.py", line 74, in _do_run
actor_instance.run(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/leapp/actors/__init__.py", line 289, in run
self.process(*args)
File "/etc/leapp/repos.d/system_upgrade/common/actors/targetuserspacecreator/actor.py", line 58, in process
userspacegen.perform()
File "/usr/lib/python3.6/site-packages/leapp/utils/deprecation.py", line 42, in process_wrapper
return target_item(*args, **kwargs)
File "/etc/leapp/repos.d/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py", line 774, in perform
target_repoids = _gather_target_repositories(context, indata, prod_cert_path)
File "/etc/leapp/repos.d/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py", line 714, in _gather_target_repositories
rhui.copy_rhui_data(context, indata.rhui_info.provider)
File "/etc/leapp/repos.d/system_upgrade/common/libraries/rhui.py", line 259, in copy_rhui_data
context.copy_to(os.path.join(data_dir, path_[0]), path_[1])
File "/etc/leapp/repos.d/system_upgrade/common/libraries/mounting.py", line 232, in copy_to
shutil.copy2(src, self.full_path(dst))
File "/usr/lib64/python3.6/shutil.py", line 263, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/usr/lib64/python3.6/shutil.py", line 120, in copyfile
with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/leapp/repos.d/system_upgrade/common/files/rhui/azure-sap-ha/content-sap-ha.crt'
SAP-HA 映射會產生:
FileNotFoundError: [Errno 2] No such file or directory:'/etc/leapp/repos.d/system_upgrade/common/files/rhui/azure-sap-ha/content-sap-ha.crt'
SAPApps 映射會產生:
FileNotFoundError: [Errno 2] No such file or directory:'/etc/leapp/repos.d/system_upgrade/common/files/rhui/azure-sap-apps/content-sapapps.crt'
基底映射會產生:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/leapp/repos.d/system_upgrade/common/files/rhui/azure/content.crt'
preupgrade solution 6
此問題的因應措施是將 SAP 映像的 版本 leapp-rhui-azure-sap
降級為 leapp-rhui-azure-sap-1.0.0-10.el8.noarch
,以及 leapp-rhui-azure
Red Hat 基底映像的 版本 leapp-rhui-azure-1.0.0-10.el8.noarch
。
SAP 映射:
sudo dnf downgrade leapp-rhui-azure-sap
基底映射:
sudo dnf downgrade leapp-rhui-azure
解決所有抑制物之後,請再次執行預降級,並確定所有問題都已解決。
Leapp 升級常見問題
在預升級報告未顯示任何錯誤或抑制因素,且所有專案都標示為已解決之後,請繼續進行 Leapp 升級。 在此報告中,輸出通常會以綠色或黃色顯示,表示執行 Leapp 升級是安全的。
下列徵兆表示在 Leapp 升級程式期間報告的一些常見錯誤。
升級徵兆 1:/var/lib/leapp/scratch 上沒有足夠的空間
如果您執行 Leapp 升級,您可能會收到下列「空間不足」錯誤訊息:
2024-06-14 19:31:45.552155 [ERROR] Actor: dnf_dry_run
Message: Not enough space available on /var/lib/leapp/scratch: Needed at least 1224 MiB.
Summary:
Detail: The file system hosting the /var/lib/leapp/scratch directory does not contain enough free space to proceed all parts of the in-place upgrade. Note the calculated required free space is the minimum derived from upgrades of minimal systems and the actual needed free space could be higher.
Needed at least: 1224 MiB.
Suggested free space: 2224 MiB (or more).
升級方案 1:擴充文件系統
擴充掛接所在的 /var/lib/leapp
文件系統。 一般而言,掛接位於 /dev/mapper/rootvg-varlv 上。
輸出通常會以綠色或黃色顯示,表示您可以安全地進行 Leapp 升級。
升級徵兆 2:openssl-libs-1:1.1.1k-12.el8_9.x86_64 與 openssl11-libs-1:1.1.1k-7.el7.x86_64 套件的檔案發生衝突
來自下列來源的連結庫之間存在衝突:
- 來自 Enterprise Linux 的額外套件 (EPEL) 存放庫的 openssl11-libs 套件
- Red Hat 所提供 RHEL 8 的 openssl 和 openssl-libs 套件(就地升級的必要專案)
在此情況下,您會收到下列錯誤訊息:
Error: Transaction test error:
file /usr/lib64/.libcrypto.so.1.1.1k.hmac from install of openssl-libs-1:1.1.1k-12.el8_9.x86_64 conflicts with file from package openssl11-libs-1:1.1.1k-7.el7.x86_64
file /usr/lib64/.libssl.so.1.1.1k.hmac from install of openssl-libs-1:1.1.1k-12.el8_9.x86_64 conflicts with file from package openssl11-libs-1:1.1.1k-7.el7.x86_64
file /usr/lib64/engines-1.1/afalg.so from install of openssl-libs-1:1.1.1k-12.el8_9.x86_64 conflicts with file from package openssl11-libs-1:1.1.1k-7.el7.x86_64
file /usr/lib64/engines-1.1/capi.so from install of openssl-libs-1:1.1.1k-12.el8_9.x86_64 conflicts with file from package openssl11-libs-1:1.1.1k-7.el7.x86_64
file /usr/lib64/engines-1.1/padlock.so from install of openssl-libs-1:1.1.1k-12.el8_9.x86_64 conflicts with file from package openssl11-libs-1:1.1.1k-7.el7.x86_64
file /usr/lib64/libcrypto.so.1.1.1k from install of openssl-libs-1:1.1.1k-12.el8_9.x86_64 conflicts with file from package openssl11-libs-1:1.1.1k-7.el7.x86_64
file /usr/lib64/libssl.so.1.1.1k from install of openssl-libs-1:1.1.1k-12.el8_9.x86_64 conflicts with file from package openssl11-libs-1:1.1.1k-7.el7.x86_64
Hint: If there was a problem reaching remote content (see stderr output) and proxy is configured in the YUM/DNF configuration file, the proxy configuration is likely causing this error. Make sure the proxy is properly configured in /etc/dnf/dnf.conf. It's also possible the proxy settings in the DNF configuration file are incompatible with the target system. A compatible configuration can be placed in /etc/leapp/files/dnf.conf which, if present, it will be used during some parts of the upgrade instead of original /etc/dnf/dnf.conf. In such case the configuration will also be applied to the target system. Note that /etc/dnf/dnf.conf needs to be still configured correctly for your current system to pass the early phases of the upgrade process.
升級解決方案 2:移除 openssl11-* 套件
確認 已為第三方廠商安裝 openssl11-* 套件。 如果該套件來自第三方廠商,請將其移除,如下列命令所示。
注意事項
如果您使用任何其他第三方套件管理員,可能會產生此衝突錯誤訊息。 在此範例中,與 openssl11 發生衝突。
sudo yum list installed | grep -i openssl11
sudo yum remove openssl11 openssl11-libs
openssl11.x86_64 1:1.1.1k-7.el7 @epel
openssl11-libs.x86_64 1:1.1.1k-7.el7 @epel
===============================================================================
Package Arch Version Repository Size
================================================================================
Removing:
openssl11 x86_64 1:1.1.1k-7.el7 @epel 1.0 M
openssl11-libs x86_64 1:1.1.1k-7.el7 @epel 3.6 M
Removing for dependencies:
nodejs x86_64 1:16.20.2-1.el7 @epel 290 k
nodejs-libs x86_64 1:16.20.2-1.el7 @epel 50 M
警告
如果 EPEL 存放庫中的其他套件,例如 nodejs 和 nodejs-libs ,會因為先前輸出中顯示的相依性問題而移除,請備份相關的組態檔,並在就地升級之後手動重新安裝相同的套件。
升級徵兆 3:安裝套件 ansible-2.9.27-1.el7ae.noarch 和 ansible-test-2.9.27-1.el7ae.noarch 發生問題
如果您執行 Leapp 升級,您可能會收到下列「DNF 執行失敗,並出現非零結束碼」錯誤訊息:
Risk Factor: high (error)
Title: DNF execution failed with non zero exit code.
Summary: {"hint": "If there was a problem reaching remote content (see stderr output) and proxy is configured in the YUM/DNF configuration file, the proxy configuration is likely causing this error. Make sure the proxy is properly configured in /etc/dnf/dnf.conf. It's also possible the proxy settings in the DNF configuration file are incompatible with the target system. A compatible configuration can be placed in /etc/leapp/files/dnf.conf which, if present, it will be used during some parts of the upgrade instead of original /etc/dnf/dnf.conf. In such case the configuration will also be applied to the target system. Note that /etc/dnf/dnf.conf needs to be still configured correctly for your current system to pass the early phases of the upgrade process.", "STDERR": "No matches found for the following disable plugin patterns: subscription-manager\nFailed loading plugin \"dnf_rhui_plugin\": No module named 'requests'\nWarning: Package marked by Leapp to upgrade not found in repositories metadata: gpg-pubkey leapp-upgrade-el7toel8 leapp python2-leapp\nTransaction check: \n\n Problem: problem with installed package ansible-2.9.27-1.el7ae.noarch\n - cannot install the best update candidate for package ansible-2.9.27-1.el7ae.noarch\n - problem with installed package ansible-test-2.9.27-1.el7ae.noarch\n - cannot install the best update candidate for package ansible-test-2.9.27-1.el7ae.noarch\n - package ansible-test-2.9.0-2.el8.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.0-2.el8, but none of the providers can be installed\n - package ansible-test-2.9.1-1.el8.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.1-1.el8, but none of the providers can be installed\n - package ansible-test-2.9.2-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.2-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.4-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.4-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.5-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.5-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.6-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.6-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.7-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.7-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.9-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.9-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.10-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.10-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.11-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.11-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.13-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.13-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.14-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.14-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.15-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.15-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.16-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.16-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.17-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.17-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.18-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.18-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.19-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.19-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.20-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.20-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.21-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.21-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.22-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.22-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.23-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.23-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.24-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.24-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.25-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.25-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.9.26-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms requires ansible = 2.9.26-1.el8ae, but none of the providers can be installed\n - package ansible-test-2.12.2-3.1.el8.x86_64 from rhel-8-for-x86_64-appstream-rhui-rpms requires ansible-core = 2.12.2-3.1.el8, but none of the providers can be installed\n - package ansible-test-2.12.2-4.el8_6.x86_64 from rhel-8-for-x86_64-appstream-rhui-rpms requires ansible-core = 2.12.2-4.el8_6, but none of the providers can be installed\n - package ansible-test-2.13.3-1.el8.x86_64 from rhel-8-for-x86_64-appstream-rhui-rpms requires ansible-core = 2.13.3-1.el8, but none of the providers can be installed\n - package ansible-test-2.13.3-2.el8_7.x86_64 from rhel-8-for-x86_64-appstream-rhui-rpms requires ansible-core = 2.13.3-2.el8_7, but none of the providers can be installed\n - package ansible-test-2.14.2-3.el8.x86_64 from rhel-8-for-x86_64-appstream-rhui-rpms requires ansible-core = 2.14.2-3.el8, but none of the providers can be installed\n - package ansible-test-2.14.2-4.el8_8.x86_64 from rhel-8-for-x86_64-appstream-rhui-rpms requires ansible-core = 2.14.2-4.el8_8, but none of the providers can be installed\n - package ansible-test-2.15.3-1.el8.x86_64 from rhel-8-for-x86_64-appstream-rhui-rpms requires ansible-core = 2.15.3-1.el8, but none of the providers can be installed\n - package ansible-test-2.16.3-2.el8.x86_64 from rhel-8-for-x86_64-appstream-rhui-rpms requires ansible-core = 2.16.3-2.el8, but none of the providers can be installed\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.0-2.el8.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.1-1.el8.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.2-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.4-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.5-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.6-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.7-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.9-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.10-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.11-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.13-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.14-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.15-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.16-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.17-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.18-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.19-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.20-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.21-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.22-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.23-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.24-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.25-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - cannot install both ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms and ansible-2.9.26-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - package ansible-core-2.12.2-3.1.el8.x86_64 from rhel-8-for-x86_64-appstream-rhui-rpms conflicts with ansible < 2.10.0 provided by ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - package ansible-core-2.12.2-4.el8_6.x86_64 from rhel-8-for-x86_64-appstream-rhui-rpms conflicts with ansible < 2.10.0 provided by ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - package ansible-core-2.13.3-1.el8.x86_64 from rhel-8-for-x86_64-appstream-rhui-rpms conflicts with ansible < 2.10.0 provided by ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - package ansible-core-2.13.3-2.el8_7.x86_64 from rhel-8-for-x86_64-appstream-rhui-rpms conflicts with ansible < 2.10.0 provided by ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - package ansible-core-2.14.2-3.el8.x86_64 from rhel-8-for-x86_64-appstream-rhui-rpms conflicts with ansible < 2.10.0 provided by ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - package ansible-core-2.14.2-4.el8_8.x86_64 from rhel-8-for-x86_64-appstream-rhui-rpms conflicts with ansible < 2.10.0 provided by ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - package ansible-core-2.15.3-1.el8.x86_64 from rhel-8-for-x86_64-appstream-rhui-rpms conflicts with ansible < 2.10.0 provided by ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - package ansible-core-2.16.3-2.el8.x86_64 from rhel-8-for-x86_64-appstream-rhui-rpms conflicts with ansible < 2.10.0 provided by ansible-2.9.27-1.el8ae.noarch from ansible-2-for-rhel-8-x86_64-rhui-rpms\n - ansible-test-2.9.27-1.el7ae.noarch from @System does not belong to a distupgrade repository\n - ansible-2.9.27-1.el7ae.noarch from @System does not belong to a distupgrade repository\n", "STDOUT": "Last metadata expiration check: 0:02:18 ago on Fri Jun 14 18:01:34 2024.\n"}
升級解決方案 3:移除 Ansible 套件
任何 Ansible 產品的系統不支援就地升級。 如需詳細資訊,請參閱 Upgrading_from_rhel_7_to_rhel_8。 若要移除 Ansible 套件,請執行下列命令:
sudo yum remove ansible ansible-test
升級徵兆 4:ImportError: /lib64/libk5crypto.so.3: 未定義的符號
libk5crypto 需要的 OpenSSL 連結庫中有不相符或遺漏的符號,如下列輸出所示:
[ 1895.402427] upgrade[557]: ImportError: /lib64/libk5crypto.so.3: undefined symbol: EVP_KDF_ctrl, version OPENSSL_1_1_1b
升級解決方案 4:移除或重新命名衝突中的檔案,並更新動態連結器
/etc/ld.so.conf.d/openssl-1.1.1d.conf 中的自定義 OpenSSL 連結庫路徑會造成問題:
sudo cat /etc/ld.so.conf.d/openssl-1.1.1d.conf
/usr/local/ssl/lib
若要解決衝突,請移除或重新命名此檔案。 然後,執行 ldconfig
來更新動態連結器運行時間系結:
sudo mv /etc/ld.so.conf.d/openssl-1.1.1d.conf /tmp
sudo ldconfig
命令 ldconfig
會更新符號連結並重建快取,以確保新安裝的連結庫已正確連結,並可供其他群組使用。
此動作可確保系統使用正確的 OpenSSL 和 libk5crypto 連結庫版本。 此外,此動作應該修正與未定義符號 EVP_KDF_ctrl
相關的 ImportError。
升級徵兆 5:Leapp 升級不會在升級期間掛接裝置
如果您執行 Leapp 升級,您可能會收到下列裝置掛接錯誤訊息:
[ 4.509104] upgrade[569]: Mounting /usr with -o defaults,ro
[ 4.590197] upgrade[596]: Spawning container sysroot on /sysroot.
[ 4.608522] upgrade[596]: Press ^] three times within 1s to kill container.
[ 4.909441] upgrade[599]: mount: can't find UUID=c044351a-93a0-45f5-afs3-d361181215b8
[ 44.830831] upgrade[638]: ==> Processing phase `InitRamStart`
[ 44.843736] upgrade[638]: ====> * remove_upgrade_boot_entry
[ 44.863656] upgrade[638]: Remove boot entry for Leapp provided initramfs.
[ 47.734944] upgrade[1155]: Process Process-230:
[ 47.745684] upgrade[1155]: Traceback (most recent call last):
[ 47.756230] upgrade[1155]: File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
[ 47.764584] upgrade[1155]: self.run()
升級解決方案 5:還原 VM 並移除 UUID
從快照集或備份還原虛擬機(VM)。
檢查 VM 上是否有錯誤訊息中的 UUID。 如果 UUID 存在,請將它批注化或從 /etc/fstab 檔案中移除。
sudo blkid
sudo cat /etc/fstab
再次執行 Leapp 升級命令。
升級徵兆 6:無法在 RHEL 7.9 上的 /sys/fs/cgroup 裝載 n/a
如果您執行 Leapp 升級,您可能會收到下列「無法掛接」錯誤訊息:
[ 4.815758] upgrade[599]: Failed to mount n/a on /sys/fs/cgroup (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_REMOUNT|MS_STRICTATIME "mode=755"): Invalid argument
[ 4.812413] kernel: cgroup2: Unknown parameter 'mode'
因為 RHEL 7 不支援控制群組第 2 版 (cgroup v2) 的掛接失敗。 如需詳細資訊,請參閱 [IPU 7>8] Leapp 失敗,並出現不支援的 cgroup v2。
升級解決方案 6:移除 systemd.unified_cgroup_hierarchy 參數
從快照集或備份還原 VM。
執行 Leapp 升級之前,請確認參數
systemd.unified_cgroup_hierarchy=1
是否位於 /proc/cmdline 或 /etc/default/grub 中。如果該參數位於其中一個檔案中,請從檔案中移除 參數,然後再次執行 Leapp 升級程式。
升級徵兆 7:Leapp 升級不會在重新啟動後繼續,而 VM 會改為開機至 RHEL 8.10
如果您執行從 RHEL 8.10 升級至 9.4 或 9.5 的 Leapp 升級,升級程式在必要的重新啟動之後可能不會繼續。 相反地,VM 會開機回到 RHEL 8.10,而不需要載入特殊的升級 initramfs。
中的 /etc/default/grub
下列設定可能會導致此問題:
GRUB_DEFAULT=0
由於 GRUB_DEFAULT=0
強制系統一律在 GRUB 中啟動第一個功能表項,因此會略過 Leapp 升級專案,並繼續開機進入現有的 RHEL 8.10 環境。
升級解決方案 7:修改 GRUB 以使用已儲存的專案
將
GRUB_DEFAULT=0
變更為GRUB_DEFAULT=saved
:注意事項
在此範例中,會
GRUB_DEFAULT
設定為0
,但在您的環境中,它可能是1
或另一個數位。 請確定您會在 命令中sed
據以取代它。sudo sed -i 's/^GRUB_DEFAULT=0/GRUB_DEFAULT=saved/' /etc/default/grub
重新產生 GRUB 組態:
GEN 1:
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
GEN 2:
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
使用序列主控台重新啟動 VM:
sudo reboot
重新啟動之後,如果正確套用修正程式,VM 會開機進入 Leapp 升級 initramfs,您應該會在序列控制台中看到類似下列幾行的輸出:
[ OK ] Reached target Remote File Systems. Starting dracut pre-mount hook... [ OK ] Finished dracut pre-mount hook. Starting File System Check on /dev/mapper/rootvg-rootlv... [ OK ] Finished File System Check on /dev/mapper/rootvg-rootlv. Mounting /sysroot... [ OK ] Mounted /sysroot. [ OK ] Reached target Initrd Root File System. [ OK ] Reached target System Upgrade. Starting dracut pre-pivot and cleanup hook... Starting System Upgrade... [ 6.507621] upgrade[677]: starting upgrade hook [ 6.531079] upgrade[677]: /bin/upgrade: line 20: /sysroot/var/tmp/system-upgrade.state: No such file or directory [ 6.543603] upgrade[677]: Storage initialisation: Attempt 0 of 11. Wait 15 seconds. [ 6.608365] dracut-pre-pivot[703]: 6.605850 | /etc/multipath.conf does not exist, blocklisting all devices. [ 6.620246] dracut-pre-pivot[703]: 6.608599 | You can run "/sbin/mpathconf --enable" to create [ 6.630208] dracut-pre-pivot[703]: 6.608921 | /etc/multipath.conf. See man mpathconf(8) for more details [ OK ] Finished dracut pre-pivot and cleanup hook. [ 21.555427] upgrade[714]: 5 logical volume(s) in volume group "rootvg" now active [ 21.581296] upgrade[677]: Mounting /usr with -o defaults,ro
此輸出表示 Leapp 升級程式已成功繼續。 完成後,VM 應該會開機進入 RHEL 9。x.
重要
如果 Leapp 升級仍然失敗,沒有明顯的原因(例如從 7.9 版升級至 8.10 版或從 8.10 版升級至 9.5 版時),請勿升級至最新版本。 相反地,請藉由指定 --target x.y
旗標,嘗試升級至中繼版本(例如從 7.9 版升級至 8.8 版或 8.10 版至 9.4 版)。 中繼升級成功之後,您可以嘗試升級至最新版本。
相關內容
協力廠商資訊免責聲明
本文提及的協力廠商產品是由與 Microsoft 無關的獨立廠商所製造。 Microsoft 不以默示或其他方式,提供與這些產品的效能或可靠性有關的擔保。
協力廠商連絡資訊免責聲明
Microsoft 提供協力廠商的連絡資訊,以協助您尋找關於此主題的其他技術支援。 此連絡資訊如有變更,恕不另行通知。 Microsoft 不保證協力廠商聯絡資訊的準確性。
與我們連絡,以取得說明
如果您有問題或需要相關協助,請建立支援要求,或詢問 Azure community 支援。 您也可以向 Azure 意見反應社群提交產品意見反應。