Como atualizar o Oracle Linux 8 para Oracle Linux 9

Hoje realizaremos o processo de atualização do Oracle Linux 8 para o Oracle Linux 9 usando o utilitário Leapp. Lembre-se sempre de testar todos os serviços, pacotes e aplicações antes de migrar seus servidores para produção.

O utilitário Leapp é um utilitário para atualizar sistemas operacionais e aplicativos.
As operações da Leapp consistem em duas fases: uma fase de pré-atualização que executa verificações do sistema para determinar se o software pode ser atualizado. A segunda fase é a atualização propriamente dita, cujo processo é baseado em arquivos de configuração que mapeiam os pacotes entre as versões anteriores e atuais do software.

1 – Confirmando que nossa versão do Oracle Linux é 8.

[root@srvol8 ~]# cat /etc/*-release | grep PRETTY
PRETTY_NAME="Oracle Linux Server 8.6"
[root@srvol8 ~]#
ShellScript

2 – Verificar todos os serviços ou aplicativos atualmente utilizados no ambiente.

[root@srvol8 ~]# systemctl list-unit-files --state=enabled
UNIT FILE                                  STATE
atd.service                                enabled
auditd.service                             enabled
[email protected]                            enabled
chronyd.service                            enabled
cloud-config.service                       enabled
cloud-final.service                        enabled
cloud-init-local.service                   enabled
cloud-init.service                         enabled
crond.service                              enabled
dbus-org.fedoraproject.FirewallD1.service  enabled
dbus-org.freedesktop.nm-dispatcher.service enabled
dbus-org.freedesktop.timedate1.service     enabled
firewalld.service                          enabled
[email protected]                             enabled
import-state.service                       enabled
irqbalance.service                         enabled
iscsi-boot-volume.service                  enabled
iscsi-onboot.service                       enabled
iscsi.service                              enabled
kdump.service                              enabled
libstoragemgmt.service                     enabled
loadmodules.service                        enabled
lvm2-monitor.service                       enabled
mcelog.service                             enabled
mdmonitor.service                          enabled
microcode.service                          enabled
multipathd.service                         enabled
NetworkManager-dispatcher.service          enabled
NetworkManager-wait-online.service         enabled
NetworkManager.service                     enabled
nfs_client_id.service                      enabled
nis-domainname.service                     enabled
nvmefc-boot-connections.service            enabled
oci-kloglevel-update.service               enabled
oci-yum-repo-mapper.service                enabled
oracle-cloud-agent-updater.service         enabled
oracle-cloud-agent.service                 enabled
oswatcher.service                          enabled
rpcbind.service                            enabled
rsyslog.service                            enabled
selinux-autorelabel-mark.service           enabled
smartd.service                             enabled
sshd.service                               enabled
sssd.service                               enabled
syslog.service                             enabled
sysstat.service                            enabled
systemd-pstore.service                     enabled
timedatex.service                          enabled
tuned.service                              enabled
udisks2.service                            enabled
uptrack-prefetch.service                   enabled
uptrack.service                            enabled
vdo.service                                enabled
dm-event.socket                            enabled
iscsid.socket                              enabled
iscsiuio.socket                            enabled
lvm2-lvmpolld.socket                       enabled
multipathd.socket                          enabled
rpcbind.socket                             enabled
sssd-kcm.socket                            enabled
ctrl-alt-del.target                        enabled
nfs-client.target                          enabled
reboot.target                              enabled
remote-fs.target                           enabled
runlevel6.target                           enabled
dnf-makecache.timer                        enabled
mlocate-updatedb.timer                     enabled
sysstat-collect.timer                      enabled
sysstat-summary.timer                      enabled
unbound-anchor.timer                       enabled
70 unit files listed.
ShellScript

3 – Interrompa toda a carga de trabalho existente, como banco de dados ou servidores da web.

[root@srvol8 ~]# systemctl stop mysql
[root@srvol8 ~]# systemctl status mysql
[root@srvol8 ~]# systemctl stop zabbix-server
[root@srvol8 ~]# systemctl status zabbix-server
ShellScript

4 – Desabilite o Secure Boot se estiver rodando.

root@srvol8 ~]# sudo bootctl status
System:
     Firmware: n/a (n/a)
  Secure Boot: disabled
   Setup Mode: user
Current Loader:
      Product: n/a
          ESP: n/a
         File: └─n/a
Boot Loader Binaries:
          ESP: /boot/efi (/dev/disk/by-partuuid/e9538cc4-b078-43d9-aca8-cdf8e635edae)
systemd-boot not installed in ESP.
         File: └─/EFI/BOOT/BOOTX64.EFI
Boot Loader Entries in EFI Variables:
        Title: Oracle Linux
           ID: 0x0004
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/e9538cc4-b078-43d9-aca8-cdf8e635edae
         File: └─/EFI/redhat/shimx64.efi
[root@srvol8 ~]# sudo mokutil --sb-state
SecureBoot disabled
ShellScript

5 – Verifique se o locale está definido como en_US.UTF-8.

[root@srvol8 ~]# cat /etc/locale.conf
LANG=en_US.UTF-8
# If necessary, edit the file to set the locale accordingly.
sudo localectl set-locale LANG=en_US.UTF-8
ShellScript

6 – Se o seu SO possuir nfs montados em rede, desmonte-os e comente as entradas relacionadas no arquivo /etc/fstab.

	
[root@srvol8 ~]# umount /BACKUP
ShellScript

7 – Se você instalou o pacote yum-plugin-versionlock, limpe todos os pacotes com versões bloqueadas.

[root@srvol8 ~]# dnf versionlock list
No such command: versionlock. Please use /bin/dnf --help
It could be a DNF plugin command, try: "dnf install 'dnf-command(versionlock)'"
[root@srvol8 ~]#
[root@srvol8 ~]# dnf versionlock clear
No such command: versionlock. Please use /bin/dnf --help
It could be a DNF plugin command, try: "dnf install 'dnf-command(versionlock)'"
ShellScript

8 – Se necessário configure o proxy Yum para poder atualizar o Oracle Linux.

[root@srvol8 ~]# cat /etc/yum.conf
proxy=<proxy-url>:<port>
ShellScript

9 – Atualizar pacotes com o DNF:

[root@srvol8 ~]# dnf update -y
Ksplice for Oracle Linux 8 (x86_64)                                                                                                                                                                     9.4 MB/s | 1.3 MB     00:00
MySQL 8.0 for Oracle Linux 8 (x86_64)                                                                                                                                                                    15 MB/s | 2.4 MB     00:00
MySQL 8.0 Tools Community for Oracle Linux 8 (x86_64)                                                                                                                                                   2.7 MB/s | 308 kB     00:00
MySQL 8.0 Connectors Community for Oracle Linux 8 (x86_64)                                                                                                                                              214 kB/s |  23 kB     00:00
Oracle Software for OCI users on Oracle Linux 8 (x86_64)                                                                                                                                                 30 MB/s |  51 MB     00:01
Oracle Linux 8 BaseOS Latest (x86_64)                                                                                                                                                                    18 MB/s |  50 MB     00:02
Oracle Linux 8 Application Stream (x86_64)                                                                                                                                                               24 MB/s |  38 MB     00:01
Oracle Linux 8 Addons (x86_64)                                                                                                                                                                           19 MB/s | 5.2 MB     00:00
Latest Unbreakable Enterprise Kernel Release 6 for Oracle Linux 8 (x86_64)                                                                                                                               25 MB/s |  54 MB     00:02
Dependencies resolved.
Installed:
  kernel-4.18.0-372.26.1.0.1.el8_6.x86_64                                 kernel-core-4.18.0-372.26.1.0.1.el8_6.x86_64                                 kernel-modules-4.18.0-372.26.1.0.1.el8_6.x86_64
Complete!
ShellScript

10 – Reinicie o servidor após as atualizações.

[root@srvol8 ~]# sudo reboot
ShellScript

11 – Instale o utilitário Leapp habilitando determinados repositórios, conforme abaixo:

[root@srvol8 ~]# sudo dnf install leapp-upgrade --enablerepo=ol8_leapp,ol8_appstream,ol8_baseos_latest
Oracle Linux 8 (x86_64) Leapp Upgrade Utilities                                                                                                                                                         111 kB/s |  28 kB     00:00
Last metadata expiration check: 0:00:01 ago on Mon 19 Sep 2022 10:48:53 PM GMT.
Dependencies resolved.
========================================================================================================================================================================================================================================
 Package                                                           Architecture                                 Version                                                   Repository                                               Size
========================================================================================================================================================================================================================================
Installing:
 leapp-upgrade-el8toel9                                            noarch                                       0.16.0-6.0.2.el8_6                                        ol8_leapp                                               617 k
Installing dependencies:
 leapp                                                             noarch                                       0.14.0-1.el8_6                                            ol8_leapp                                                31 k
 leapp-deps                                                        noarch                                       0.14.0-1.el8_6                                            ol8_leapp                                                14 k
 leapp-upgrade-el8toel9-deps                                       noarch                                       0.16.0-6.0.2.el8_6                                        ol8_leapp                                                31 k
 python3-leapp                                                     noarch                                       0.14.0-1.el8_6                                            ol8_leapp                                               173 k
 systemd-container                                                 x86_64                                       239-58.0.1.el8_6.7                                        ol8_baseos_latest                                       759 k
Transaction Summary
========================================================================================================================================================================================================================================
Install  6 Packages
Total download size: 1.6 M
Installed size: 3.8 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): systemd-container-239-58.0.1.el8_6.7.x86_64.rpm                                                                                                                                                   13 MB/s | 759 kB     00:00
(2/6): leapp-deps-0.14.0-1.el8_6.noarch.rpm                                                                                                                                                             161 kB/s |  14 kB     00:00
(3/6): leapp-0.14.0-1.el8_6.noarch.rpm                                                                                                                                                                  341 kB/s |  31 kB     00:00
(4/6): python3-leapp-0.14.0-1.el8_6.noarch.rpm                                                                                                                                                          2.3 MB/s | 173 kB     00:00
(5/6): leapp-upgrade-el8toel9-0.16.0-6.0.2.el8_6.noarch.rpm                                                                                                                                             4.9 MB/s | 617 kB     00:00
(6/6): leapp-upgrade-el8toel9-deps-0.16.0-6.0.2.el8_6.noarch.rpm                                                                                                                                         57 kB/s |  31 kB     00:00
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                   2.5 MB/s | 1.6 MB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                                                                                1/1
  Installing       : leapp-deps-0.14.0-1.el8_6.noarch                                                                                                                                                                               1/6
  Installing       : python3-leapp-0.14.0-1.el8_6.noarch                                                                                                                                                                            2/6
  Installing       : leapp-0.14.0-1.el8_6.noarch                                                                                                                                                                                    3/6
  Installing       : systemd-container-239-58.0.1.el8_6.7.x86_64                                                                                                                                                                    4/6
  Installing       : leapp-upgrade-el8toel9-deps-0.16.0-6.0.2.el8_6.noarch                                                                                                                                                          5/6
  Installing       : leapp-upgrade-el8toel9-0.16.0-6.0.2.el8_6.noarch                                                                                                                                                               6/6
  Running scriptlet: leapp-upgrade-el8toel9-0.16.0-6.0.2.el8_6.noarch                                                                                                                                                               6/6
  Verifying        : systemd-container-239-58.0.1.el8_6.7.x86_64                                                                                                                                                                    1/6
  Verifying        : leapp-0.14.0-1.el8_6.noarch                                                                                                                                                                                    2/6
  Verifying        : leapp-deps-0.14.0-1.el8_6.noarch                                                                                                                                                                               3/6
  Verifying        : leapp-upgrade-el8toel9-0.16.0-6.0.2.el8_6.noarch                                                                                                                                                               4/6
  Verifying        : leapp-upgrade-el8toel9-deps-0.16.0-6.0.2.el8_6.noarch                                                                                                                                                          5/6
  Verifying        : python3-leapp-0.14.0-1.el8_6.noarch                                                                                                                                                                            6/6
Installed:
  leapp-0.14.0-1.el8_6.noarch                    leapp-deps-0.14.0-1.el8_6.noarch    leapp-upgrade-el8toel9-0.16.0-6.0.2.el8_6.noarch    leapp-upgrade-el8toel9-deps-0.16.0-6.0.2.el8_6.noarch    python3-leapp-0.14.0-1.el8_6.noarch
  systemd-container-239-58.0.1.el8_6.7.x86_64
Complete!
[root@srvol8 ~]#
ShellScript

12 – Executando o Preupgrade, Edite PermitRootLogin para yes.

root@srvol8 ~]# cat /etc/ssh/sshd_config | grep PermitRootLogin
##PermitRootLogin yes
## the setting of "PermitRootLogin without-password".
PermitRootLogin yes # <============================
root@srvol8 ~]# systemctl restart sshd
ShellScript

13 – Gerando relatório para análise e validação antes da atualização do Oracle Linux 8 para o Oracle Linux 9.

13.1 – Verificação de pré-atualização no sistema local:

leapp preupgrade --oraclelinux
ShellScript

13.2 – Verificação pré-atualização OCI:

leapp preupgrade --oci
ShellScript

13.3 – Repositórios de verificação pré-atualização

	
leapp preupgrade --enablerepo
ShellScript
[root@srvol8 ~]# leapp preupgrade --oraclelinux
==> Processing phase `configuration_phase`
====> * ipu_workflow_config
        IPU workflow config actor
==> Processing phase `FactsCollection`
====> * scan_custom_repofile
        Scan the custom /etc/leapp/files/leapp_upgrade_repositories.repo repo file.
====> * scanmemory
        Scan Memory of the machine.
====> * repository_mapping
        Produces message containing repository mapping based on provided file.
====> * load_device_driver_deprecation_data
        Loads deprecation data for drivers and devices (PCI & CPU)
====> * root_scanner
        Scan the system root directory and produce a message containing
====> * sssd_facts_8to9
        Check SSSD configuration for changes in OL9 and report them in model.
====> * scancpu
        Scan CPUs of the machine.
====> * network_deprecations
        Ensures that network configuration doesn't rely on unsupported settings
====> * rpm_scanner
        Provides data about installed RPM Packages.
====> * scancryptopolicies
        Scan information about system wide set crypto policies
====> * firewalld_collect_global_config
        This actor reads firewalld's configuration and produces Model
====> * get_enabled_modules
        Provides data about which module streams are enabled on the source system.
====> * scan_sap_hana
        Gathers information related to SAP HANA instances on the system.
====> * scan_kernel_cmdline
        No documentation has been provided for the scan_kernel_cmdline actor.
====> * persistentnetnames
        Get network interface information for physical ethernet interfaces of the original system.
====> * system_facts
        Provides data about many facts from system.
====> * firewalld_collect_used_object_names
        This actor reads firewalld's configuration and produces Model
====> * transaction_workarounds
        Provides additional RPM transaction tasks based on bundled RPM packages.
====> * scan_pkg_manager
        Provides data about package manager (yum/dnf)
====> * persistentnetnamesdisable
        Disable systemd-udevd persistent network naming on machine with single eth0 NIC
====> * scan_subscription_manager_info
        Scans the current system for subscription manager information
====> * storage_scanner
        Provides data about storage settings.
====> * get_installed_desktops
        Actor checks if kde or gnome desktop environments
====> * selinuxcontentscanner
        Scan the system for any SELinux customizations
====> * scandasd
        In case of s390x architecture, check whether DASD is used.
====> * common_leapp_dracut_modules
        Influences the generation of the initram disk
====> * check_custom_network_scripts
        Check the existence of custom network-scripts and warn user about possible
====> * scanclienablerepo
        Produce CustomTargetRepository based on the LEAPP_ENABLE_REPOS in config.
====> * check_ifcfg
        Ensures that ifcfg files are compatible with NetworkManager
====> * oracle_signed_rpm_scanner
        Provide data about installed RPM Packages signed by Oracle.
====> * udevadm_info
        Produces data exported by the "udevadm info" command.
====> * scan_files_for_target_userspace
        Scan the source system and identify files that will be copied into the target userspace when it is created.
====> * vdo_conversion_scanner
        Provides conversion info about VDO devices.
====> * multipath_conf_read
        Read multipath configuration files and extract the necessary informaton
====> * xfs_info_scanner
        This actor scans all mounted mountpoints for XFS information
====> * rpm_transaction_config_tasks_collector
        Provides additional RPM transaction tasks from /etc/leapp/transaction.
====> * biosdevname
        Enable biosdevname on the target OL system if all interfaces on the source OL
====> * ipa_scanner
        Scan system for ipa-client and ipa-server status
====> * detect_kernel_drivers
        Matches all currently loaded kernel drivers against known deprecated and removed drivers.
====> * used_repository_scanner
        Scan used enabled repositories
====> * pes_events_scanner
        Provides data about package events from Package Evolution Service.
====> * setuptargetrepos
        Produces list of repositories that should be available to be used by Upgrade process.
==> Processing phase `Checks`
====> * check_etc_releasever
        Check releasever info and provide a guidance based on the facts
====> * checkhybridimage
        Check if the system is using Azure hybrid image.
====> * check_vdo
        Check if VDO devices need to be migrated to lvm management.
====> * check_boot_avail_space
        Check if at least 100Mib of available space on /boot. If not, inhibit the upgrade process.
====> * check_luks_and_inhibit
        Check if any encrypted partitions is in use. If yes, inhibit the upgrade process.
====> * check_btrfs
        Check if Btrfs filesystem is in use. If yes, inhibit the upgrade process.
====> * efi_check_boot
        Adjust EFI boot entry for first reboot
====> * check_rpm_transaction_events
        Filter RPM transaction events based on installed RPM packages
====> * check_kvm
        Check if Oracle KVM is installed and ensure ol9_kvm_utils is enabled
====> * check_se_linux
        Check SELinux status and produce decision messages for further action.
====> * mariadb_check
        Actor checking for presence of MariaDB installation.
====> * check_root_symlinks
        Check if the symlinks /bin and /lib are relative, not absolute.
====> * checkcpu
        Check whether the CPU is supported by the target system. Inhibit upgrade if not.
====> * check_detected_devices_and_drivers
        Checks whether or not detected devices and drivers are usable on the target system.
====> * postgresql_check
        Actor checking for presence of PostgreSQL installation.
====> * check_nfs
        Check if NFS filesystem is in use. If yes, inhibit the upgrade process.
====> * check_ocibm
        Check if the system is an OCI BM shape. If yes, inhibit the upgrade process.
====> * yum_config_scanner
        Scans the configuration of the YUM package manager.
====> * check_installed_kernels
        Inhibit IPU (in-place upgrade) when installed kernels conflict with a safe upgrade.
====> * check_kpatch
        Carry over kpatch-dnf and it's config into the container
====> * firewalld_check_allow_zone_drifting
        This actor will check if AllowZoneDrifiting=yes in firewalld.conf. This
====> * CheckDefaultBootKernel
        Check the default boot kernel, set to UEK if BTRFS is detected.
====> * checktargetrepos
        Check whether target yum repositories are specified.
====> * unsupported_upgrade_check
        Checks enviroment variables and produces a warning report if the upgrade is unsupported.
====> * check_deprecated_rpm_signature
        Check whether any packages signed by RSA/SHA1 are installed
====> * check_uekr7
        Inhibit aarch64 upgrade if running UEKR6 or BTRFS filesystem in use.
====> * check_fips
        Inhibit upgrade if FIPS is detected as enabled.
====> * sssd_check_8to9
        Check SSSD configuration for changes in RHEL9 and report them in model.
====> * check_oracle_enabled_repos
        Check repos enabled on the leapp command line.
====> * check_osms
        Check if OS Management Service (OSMS) is configured and active. If yes, inhibit the upgrade process.
====> * check_os_release
        Check if the current OL minor version is supported. If not, inhibit the upgrade process.
====> * check_yum_plugins_enabled
        Checks that the required yum plugins are enabled.
====> * check_olm
        Check if OLM client packages are installed and ensure upgrade repo is enabled.
====> * check_system_arch
        Check if system is running at a supported architecture. If no, inhibit the upgrade process.
====> * check_grub_core
        Check whether we are on legacy (BIOS) system and instruct Leapp to upgrade GRUB core
====> * firewalld_check_service_tftp_client
        This actor will inhibit if firewalld's configuration is using service
====> * check_skipped_repositories
        Produces a report if any repositories enabled on the system are going to be skipped.
====> * oracle_signed_rpm_check
        Check if there are packages not signed by Oracle in use. If yes, warn user about it.
====> * check_non_mount_boot_s390
        Inhibits on s390 when /boot is NOT on a separate partition.
====> * check_btrfs_raid
        Check if Btrfs RAID is in use. If yes, inhibit the upgrade process.
====> * check_ipa_server
        Check for ipa-server and inhibit upgrade
====> * check_skip_phase
        Skip all the subsequent phases until the report phase.
==> Processing phase `Reports`
====> * verify_check_results
        Check all dialogs and notify that user needs to make some choices.
====> * verify_check_results
        Check all generated results messages and notify user about them.
============================================================
                     UPGRADE INHIBITED
============================================================
Upgrade has been inhibited due to the following problems:
    1. Inhibitor: Firewalld Configuration AllowZoneDrifting Is Unsupported
    2. Inhibitor: The OS Management Service (OSMS) agent is running on this instance.
Consult the pre-upgrade report for details and possible remediation.
============================================================
                     UPGRADE INHIBITED
============================================================
Debug output written to /var/log/leapp/leapp-preupgrade.log
============================================================
                           REPORT
============================================================
A report has been generated at /var/log/leapp/leapp-report.json
A report has been generated at /var/log/leapp/leapp-report.txt
============================================================
                       END OF REPORT
============================================================
Answerfile has been generated at /var/log/leapp/answerfile
[root@srvol8 ~]#
ShellScript

14 – Leia os logsa do relatório para entender quais pacotes, bibliotecas ou aplicativos podem ser afetados ou possíveis problemas que devem ser avaliados antes do upgrade de versão.

============================================================
                     UPGRADE INHIBITED
============================================================
Upgrade has been inhibited due to the following problems:
    1. Inhibitor: Firewalld Configuration AllowZoneDrifting Is Unsupported
    2. Inhibitor: The OS Management Service (OSMS) agent is running on this instance.
Consult the pre-upgrade report for details and possible remediation.
============================================================
                     UPGRADE INHIBITED
============================================================
Debug output written to /var/log/leapp/leapp-preupgrade.log
============================================================
                           REPORT
============================================================
A report has been generated at /var/log/leapp/leapp-report.json
A report has been generated at /var/log/leapp/leapp-report.txt
============================================================
                       END OF REPORT
============================================================
Answerfile has been generated at /var/log/leapp/answerfile
ShellScript

15 – Aplique as correções recomendadas se necessário.

[root@srvol8 ~]# cat /var/log/leapp/leapp-report.txt
Risk Factor: high (inhibitor)
Title: The OS Management Service (OSMS) agent is running on this instance.
Summary: The OSMS service is active on this instance.
 
The OS Management Service does not currently support Oracle Linux 9 AppStreams, also known as modules or module streams.
Upgrade cannot proceed with the OSMS agent active. Please refer to https://docs.oracle.com/en-us/iaas/os-management/osms/osms-getstarted.htm for more information about OSMS and Oracle Linux 8.
Remediation: [hint] The OSMS agent is included in OCI Oracle Linux platform images and installed by default. If the instance is not actively managed by OSMS, the OSMS agent can be disabled from the OCI console and the upgrade can proceed. Please refer to https://docs.oracle.com/en/operating-systems/oracle-linux/9/leapp/ for information about disabling the OSMS agent.
Key: e7294fc948dcf21ecf231abc2e1ceba50005a6bc
----------------------------------------
Risk Factor: high (inhibitor)
Title: Firewalld Configuration AllowZoneDrifting Is Unsupported
Summary: Firewalld has enabled configuration option "AllowZoneDrifiting" which has been removed in OL9. New behavior is as if "AllowZoneDrifiting" was set to "no".
Remediation: [hint] Set AllowZoneDrifting=no in /etc/firewalld/firewalld.conf
[command] sed -i "s/^AllowZoneDrifting=.*/AllowZoneDrifting=no/" /etc/firewalld/firewalld.conf
Key: 5b1cf050e1a877b0358b6e8c612277c591d40c13
----------------------------------------
Risk Factor: high
Title: Packages not signed by Oracle found on the system
Summary: The following packages have not been signed by Oracle and may be removed during the upgrade process in case Oracle-signed packages to be removed during the upgrade depend on them:
- gpg-pubkey
Key: f5a5d58476a97bf0a8904d00df5d1321189849ad
----------------------------------------
Risk Factor: medium
Title: Default Boot Kernel
Summary: Setting default boot kernel in OL9 to RHCK
Key: 536a8dee211d9f0998aa21f8e5bcd9f3beaf022d
----------------------------------------
Risk Factor: low
Title: SElinux will be set to permissive mode
Summary: SElinux will be set to permissive mode. Current mode: enforcing. This action is required by the upgrade process to make sure the upgraded system can boot without beinig blocked by SElinux rules.
Remediation: [hint] Make sure there are no SElinux related warnings after the upgrade and enable SElinux manually afterwards. Notice: You can ignore the "/root/tmp_leapp_py3" SElinux warnings.
Key: 39d7183dafba798aa4bbb1e70b0ef2bbe5b1772f
----------------------------------------
Risk Factor: info
Title: SElinux relabeling will be scheduled
Summary: SElinux relabeling will be scheduled as the status is permissive/enforcing.
Key: 8fb81863f8413bd617c2a55b69b8e10ff03d7c72
----------------------------------------
ShellScript

16 – Aplicando a atualização do Oracle Linux 8 para o Oracle Linux 9.

[root@srvol8 ~]# leapp upgrade --oci --verbose
2022-09-20 00:33:10.149 INFO     PID: 2247 leapp: Logging has been initialized
Transaction Summary
=================================================================================================================
Install     87 Packages
Upgrade    659 Packages
Remove      32 Packages
Downgrade   30 Packages
 
Total size: 1.0 G
DNF will only download packages, install gpg keys, and check the transaction.
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Complete!
2022-09-20 01:04:36.964 INFO     PID: 2247 leapp.workflow.InterimPreparation: Executing actor add_upgrade_boot_entry
2022-09-20 01:04:37.655 WARNING  PID: 61133 leapp.workflow.InterimPreparation.add_upgrade_boot_entry: Could not remove /boot/vmlinuz-upgrade.x86_64 entry. May be ignored if the entry did not exist.
2022-09-20 01:04:38.364 INFO     PID: 2247 leapp.workflow.InterimPreparation: Starting stage After of phase InterimPreparation
A reboot is required to continue. Please reboot your system.
 
2022-09-20 01:04:38.438 INFO     PID: 2247 leapp: Answerfile will be created at /var/log/leapp/answerfile
 
Debug output written to /var/log/leapp/leapp-upgrade.log
 
============================================================
                           REPORT
============================================================
 
A report has been generated at /var/log/leapp/leapp-report.json
A report has been generated at /var/log/leapp/leapp-report.txt
 
============================================================
                       END OF REPORT
============================================================
 
Answerfile has been generated at /var/log/leapp/answerfile
ShellScript

17 – Se sua sessão cair, verifique os logs gerados no diretório.

[root@srvol8 leapp]# cd /var/log/leapp/
[root@srvol8 leapp]# ls -lat
total 900
-rw-r--r--.  1 root root 880744 Sep 19 22:58 leapp-upgrade.log
drwx------.  3 root root     94 Sep 19 22:57 .
drwxr-xr-x.  2 root root     46 Sep 19 22:57 archive
-rw-r--r--.  1 root root      0 Sep 19 22:51 answerfile.userchoices
-rw-r--r--.  1 root root      0 Sep 19 22:51 answerfile
drwxr-xr-x. 11 root root   4096 Sep 19 22:49 ..
[root@srvol8 leapp]#
ShellScript

18 – Avaliar e analisar relatórios após migração de versão.

============================================================
                     UPGRADE INHIBITED
============================================================
Debug output written to /var/log/leapp/leapp-upgrade.log
============================================================
                           REPORT
============================================================
A report has been generated at /var/log/leapp/leapp-report.json
A report has been generated at /var/log/leapp/leapp-report.txt
============================================================
                       END OF REPORT
============================================================
Answerfile has been generated at /var/log/leapp/answerfile
ShellScript

19 – Reinicie o servidor.

[root@srvol8 leapp]# sudo reboot
ShellScript

20 – Upgrade de pacotes apos a reinicialização do servidor pela console de OCI.

21 – Verificando a versão atual do kernel instalado e a versão do sistema operacional.

[root@srvol8 ~]# cat /etc/*-release | grep PRETTY
PRETTY_NAME="Oracle Linux Server 9.0"
 
[root@srvol8 ~]# uname -r
5.14.0-70.22.1.0.1.el9_0.x86_64
ShellScript

22 – Atualização e upgrade de pacotes.

[root@srvol8 ~]# dnf update -y
Ksplice for Oracle Linux 9 (x86_64)                                                                                                                                                                     8.7 kB/s | 7.6 kB     00:00
Oracle Linux 9 OCI Included Packages (x86_64)                                                                                                                                                           6.9 MB/s | 6.9 MB     00:01
Oracle Linux 9 BaseOS Latest  (x86_64)                                                                                                                                                                  4.2 MB/s | 3.6 MB     00:00
Oracle Linux 9 Application Stream Packages (x86_64)                                                                                                                                                     8.8 MB/s | 8.8 MB     00:01
Oracle Linux 9 Addons (x86_64)                                                                                                                                                                          108 kB/s |  85 kB     00:00
Oracle Linux 9 UEK Release 7 (x86_64)                                                                                                                                                                   2.6 MB/s | 2.1 MB     00:00
Dependencies resolved.
Nothing to do.
Complete!
 
[root@srvol8 ~]# dnf upgrade -y
Last metadata expiration check: 0:00:09 ago on Tue 20 Sep 2022 01:40:36 AM GMT.
Dependencies resolved.
Nothing to do.
Complete!
ShellScript

23 – Links da documentação:

https://blogs.oracle.com/linux/post/announcing-oracle-linux-9-general-availability
https://blogs.oracle.com/linux/post/upgrade-oracle-linux-8-to-oracle-linux-9-using-leapp
https://docs.oracle.com/en/learn/ol-linux-leapp/index.html
https://docs.oracle.com/en/operating-systems/oracle-linux/9/relnotes9.0/
ShellScript
search previous next tag category expand menu location phone mail time cart zoom edit close