以前、GCP上でAlmaLinux8.6→9.3のアップグレードを行い無事完了しましたが、Vagrant上の開発環境では簡単にはいかない様でした。念のため、いくつかクリアできて点もあり、そこで引っかかっているケースは対応できると思うので、残しておこうと思います。
基本は、上記記事と同じ。
# dnf update --releasever=8.8
# reboot
# dnf install -y http://repo.almalinux.org/elevate/elevate-release-latest-el$(rpm --eval %rhel).noarch.rpm
# dnf install -y leapp-upgrade leapp-data-almalinux
# vi /etc/firewalld/firewalld.conf
AllowZoneDrifting=no
# leapp preupgrade
ここまでは特に変わらず。
出力されたエラーが少々異なっていた。
============================================================
UPGRADE INHIBITED
============================================================
Upgrade has been inhibited due to the following problems:
1. Inhibitor: Unsupported network configuration
2. Inhibitor: Missing required answers in the answer file.
Consult the pre-upgrade report for details and possible remediation.
============================================================
UPGRADE INHIBITED
============================================================
/var/log/leapp/leapp-report.txt をチェックしてみるとこんな感じ。
Risk Factor: high (inhibitor)
Title: Unsupported network configuration
Summary: Detected multiple physical network interfaces where one or more use kernel naming (e.g. eth0). Upgrade process can not continue because stability of names can not be guaranteed. Please read the article at https://access.redhat.com/solutions/4067471 for more information.
Remediation: [hint] Rename all ethX network interfaces following the attached KB solution article.
Key: d3050d265759a79ce895e64f45e9c56e49b3a953
----------------------------------------
Risk Factor: high (inhibitor)
Title: Missing required answers in the answer file
Summary: One or more sections in answerfile are missing user choices: check_vdo.no_vdo_devices
For more information consult https://leapp.readthedocs.io/en/latest/dialogs.html
Remediation: [hint] Please register user choices with leapp answer cli command or by manually editing the answerfile.
[command] leapp answer --section check_vdo.no_vdo_devices=True
Key: 654870763dcb693f9733b4d86bfae8da175e6d66
----------------------------------------
Risk Factor: high
Title: Leapp could not identify where GRUB core is located
Summary: We assume GRUB core is located on the same device as /boot. Leapp needs to update GRUB core as it is not done automatically on legacy (BIOS) systems.
Remediation: [hint] Please run "grub2-install <GRUB_DEVICE> command manually after upgrade
Key: ca7a1a66906a7df3da890aa538562708d3ea6ecd
----------------------------------------
Risk Factor: high
Title: Packages not signed by Red Hat found on the system
Summary: The following packages have not been signed by Red Hat and may be removed during the upgrade process in case Red Hat-signed packages to be removed during the upgrade depend on them:
- ImageMagick
- ImageMagick-libs
- ImageMagick-perl
- elevate-release
- gd3php
- gpg-pubkey
- haveged
- leapp
- leapp-data-almalinux
- leapp-deps
- leapp-upgrade-el8toel9
- leapp-upgrade-el8toel9-deps
- libaom
- libavif
- libdav1d
- libimagequant
- liblqr-1
- liblzf
- libraqm
- libsodium
- oniguruma5php
- php
- php-cli
- php-common
- php-devel
- php-fpm
- php-gd
- php-mbstring
- php-mysqlnd
- php-opcache
- php-pdo
- php-pecl-igbinary
- php-pecl-imagick-im6
- php-pecl-msgpack
- php-pecl-redis5
- php-sodium
- php-xml
- php80-php-common
- php80-runtime
- python3-leapp
- remi-release
- svt-av1-libs
Key: 13f0791ae5f19f50e7d0d606fb6501f91b1efb2c
----------------------------------------
Risk Factor: info
Title: LEAPP detected SELinux disabled in "/etc/selinux/config"
Summary: On RHEL 9, disabling SELinux in "/etc/selinux/config" is no longer possible. This way, the system starts with SELinux enabled but with no policy loaded. LEAPP will automatically disable SELinux using "SELINUX=0" kernel command line parameter. However, Red Hat strongly recommends to have SELinux enabled
Key: a32598d132c02dc20fd3daf631e85770623d3f8e
----------------------------------------
Risk Factor: info
Title: SElinux disabled
Summary: SElinux disabled, continuing...
Key: 4f25fea9b15b9d1d07d52cc1de02073f295dac3d
----------------------------------------
Risk Factor: info
Title: VDO devices migration to LVM management
Summary: User has asserted there are no VDO devices on the system in need of conversion to LVM management.
Key: fd8c575ed9a68bbea162e30396a1a5a96219f9c1
----------------------------------------
まず、簡単なので2つ目のアラートから対応します。
2. Inhibitor: Missing required answers in the answer file.
は、おすすめの対処法にもあるとおりのコマンドを入力でOK。
# leapp answer --section check_vdo.no_vdo_devices=True
次に一つ目のアラート。
1. Inhibitor: Unsupported network configuration
これについては、ネットワークインターフェースの名称が「eth●」の様なものはダメということらしいので、修正してみましょう。
まずは、現状確認。
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether xx:xx:xx:xx:xx:4a brd ff:ff:ff:ff:ff:ff
altname enp0s3
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether xx:xx:xx:xx:xx:f5 brd ff:ff:ff:ff:ff:ff
altname enp0s8
altnameは「enp0s3」「enp0s8」となっていますが、インターフェース名は「eth1」「eth2」になっている様です。
では、名前の変更を試みます。
ファイル名を現在のインターフェース名から変更後の名称(altnameにしてみます)に変更と、設定ファイル内に「NAME」「DEVICE」「HWADDR」の設定を変更・追加します(必要な項目しか記していません)。HWADDRは先ほど確認した「link/ether」の欄のものになります。VirtualBoxの設定を見ても構いません。
# cd /etc/sysconfig/network-scripts/
# mv ifcfg-eth0 ifcfg-enp0s3
# vi ifcfg-enp0s3
NAME="enp0s3"
DEVICE="enp0s3"
HWADDR=xx:xx:xx:xx:x:4a
# mv ifcfg-eth1 ifcfg-enp0s8
# vi ifcfg-enp0s8
NAME=enp0s8
DEVICE=enp0s8
HWADDR=xx:xx:xx:xx:xx:f5
# reboot
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether xx:xx:xx:xx:xx:4a brd ff:ff:ff:ff:ff:ff
altname enp0s3
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether xx:xx:xx:xx:xx:f5 brd ff:ff:ff:ff:ff:ff
altname enp0s8
これで、leapp preupgradeしてみると、問題無し!
leapp upgradeしても同様に問題無かったので、rebootしてみると、お亡くなり~でした>_<
VirtualBoxから画面を開いてみるとこんな感じ。
upgrade用のカーネルが起動して、アップグレード処理に入りますが、VMをディスクイメージをマウントするための、モジュールが読み込めていない感じ?upgrade用のカーネルにVagrantのguestプラグインなどが読み込まれていない?vagrant側の設定やら、設定ファイルやら、色々、本当色々と半日以上試しましたが、どうにもなりませんでした。お手上げ~。
Inhibitor: Unsupported network configuration
Inhibitor: Missing required answers in the answer file.
の解決方法記事ということで、ご容赦を。
Add comment