1

I am trying to upgrade several physical servers from RHEL 7.9 to linux rocky 8.6. So far the process was successful on 3-4 servers. On the server that I have the issue everything works fine and when I reboot the server then I choose to boot with ELevate-Upgrade-Initramfs.

Running:

leapp preupgrade 

come back without any errors

After that I am running:

leapp upgrade  

and it completes without any issues. I do a reboot and after choosing "ELevate-Upgrade-Initramfs", is trying to do the upgrade and it fails.

Here is the last part of the leapp-upgrade.log

Oct 05 10:24:01 localhost upgrade[691]: ==> Processing phase `InitRamStart`
Oct 05 10:24:01 localhost upgrade[691]: ====> * remove_upgrade_boot_entry
Oct 05 10:24:01 localhost upgrade[691]:         Remove boot entry for Leapp provided initramfs.
Oct 05 10:24:02 localhost upgrade[691]: ==> Processing phase `LateTests`
Oct 05 10:24:02 localhost upgrade[691]: ====> * persistentnetnamesinitramfs
Oct 05 10:24:02 localhost upgrade[691]:         Get network interface information for physical ethernet interfaces with the new kernel in initramfs.
Oct 05 10:24:02 localhost upgrade[691]: ==> Processing phase `Preparation`
Oct 05 10:24:02 localhost upgrade[691]: ====> * removed_pam_modules_apply
Oct 05 10:24:02 localhost upgrade[691]:         Remove old PAM modules that are no longer available in RHEL-8 from
Oct 05 10:24:02 localhost upgrade[691]: ====> * remove_boot_files
Oct 05 10:24:02 localhost upgrade[691]:         Remove Leapp provided initramfs from boot partition.
Oct 05 10:24:03 localhost upgrade[691]: ====> * selinuxprepare
Oct 05 10:24:03 localhost upgrade[691]:         Remove selinux policy customizations before updating selinux-policy* packages
Oct 05 10:24:16 localhost upgrade[691]: ====> * update_etc_sysconfig_kernel
Oct 05 10:24:16 localhost upgrade[691]:         Update /etc/sysconfig/kernel file.
Oct 05 10:24:16 localhost upgrade[691]: ====> * applytransactionworkarounds
Oct 05 10:24:16 localhost upgrade[691]:         Executes registered workaround scripts on the system before the upgrade transaction
Oct 05 10:24:17 localhost upgrade[1444]: Applying transaction workaround - yum config fix
Oct 05 10:24:17 localhost upgrade[691]: ====> * zipl_convert_to_blscfg
Oct 05 10:24:17 localhost upgrade[691]:         Convert the zipl boot loader configuration to the the boot loader specification on s390x systems.
Oct 05 10:24:17 localhost upgrade[691]: ====> * bind_update
Oct 05 10:24:17 localhost upgrade[691]:         Actor parsing facts found in configuration and modifing configuration.
Oct 05 10:24:18 localhost upgrade[691]: ==> Processing phase `RPMUpgrade`
Oct 05 10:24:18 localhost upgrade[691]: ====> * prepare_python_workround
Oct 05 10:24:18 localhost upgrade[691]:         Prepare environment to be able to run leapp with Python3 in initrd.
Oct 05 10:24:18 localhost upgrade[691]: ====> * dnf_upgrade_transaction
Oct 05 10:24:18 localhost upgrade[691]:         Setup and call DNF upgrade command
Oct 05 10:24:29 localhost upgrade[1640]: Last metadata expiration check: 0:10:41 ago on Wed Oct  5 12:13:43 2022.
Oct 05 10:24:29 localhost upgrade[1640]: Dependencies resolved.
Oct 05 10:24:29 localhost upgrade[1640]: ==========================================================================================================================
Oct 05 10:24:29 localhost upgrade[1640]:  Package                                Arch    Version                                           Repository          Size
Oct 05 10:24:29 localhost upgrade[1640]: ==========================================================================================================================
...
Oct 05 10:24:36 localhost upgrade[1640]: Removing dependent packages:
Oct 05 10:24:36 localhost upgrade[1640]:  lz4                                    i686    1.8.3-1.el7                                       @System            207 k
Oct 05 10:24:36 localhost upgrade[1640]:  python-firewall                        noarch  0.6.3-13.el7_9                                    @System            1.9 M
Oct 05 10:24:36 localhost upgrade[1640]:  python2-dnf                            noarch  4.0.9.2-2.el7_9                                   @System            1.9 M
Oct 05 10:24:36 localhost upgrade[1640]:  python2-libcomps                       x86_64  0.1.8-14.el7                                      @System            140 k
Oct 05 10:24:36 localhost upgrade[1640]: Downgrading:
Oct 05 10:25:24 localhost upgrade[1640]:  atk                                    x86_64  2.28.1-1.el8                                      rocky8-appstream   2Process Process-216:
Oct 05 10:25:24 localhost upgrade[1640]: Traceback (most recent call last):
Oct 05 10:25:24 localhost upgrade[1640]:   File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
Oct 05 10:25:24 localhost upgrade[1640]:     self.run()
Oct 05 10:25:24 localhost upgrade[1640]:   File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
Oct 05 10:25:24 localhost upgrade[1640]:     self._target(*self._args, **self._kwargs)
Oct 05 10:25:24 localhost upgrade[1640]:   File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 72, in _do_run
Oct 05 10:25:24 localhost upgrade[1640]:     actor_instance.run(*args, **kwargs)
Oct 05 10:25:24 localhost upgrade[1640]:   File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 290, in run
Oct 05 10:25:24 localhost upgrade[1640]:     self.process(*args)
Oct 05 10:25:24 localhost upgrade[1640]:   File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/dnfupgradetransaction/actor.py", line 54, in process
Oct 05 10:25:24 localhost upgrade[1640]:     plugin_info=plugin_info
Oct 05 10:25:24 localhost upgrade[1640]:   File "/usr/share/leapp-repository/repositories/system_upgrade/common/libraries/dnfplugin.py", line 342, in perform_transaction_install
Oct 05 10:25:24 localhost upgrade[1640]:     cmd_prefix=cmd_prefix
Oct 05 10:25:24 localhost upgrade[1640]:   File "/usr/share/leapp-repository/repositories/system_upgrade/common/libraries/dnfplugin.py", line 219, in _transaction
Oct 05 10:25:24 localhost upgrade[1640]:     e.stdout = e.stdout.encode('utf-8', 'xmlcharrefreplace')
Oct 05 10:25:24 localhost upgrade[1640]: AttributeError: can't set attribute
Oct 05 10:25:24 localhost upgrade[1640]: 70 k
Oct 05 10:25:24 localhost upgrade[1640]:  irqbalance                             x86_64  2:1.4.0-6.el8                                     rocky8-baseos       55 k
Oct 05 10:25:24 localhost upgrade[1640]:  libcgroup                              x86_64  0.41-19.el8                                       rocky8-baseos       69 k
Oct 05 10:25:24 localhost upgrade[1640]:  libcroco                               x86_64  0.6.12-4.el8_2.1                                  rocky8-baseos      112 k
Oct 05 10:25:24 localhost upgrade[1640]:  nodejs                                 x86_64  1:10.24.0-1.module+el8.3.0+101+f84c7154           rocky8-appstream   8.8 M
Oct 05 10:25:24 localhost upgrade[1640]: Transaction Summary

Then I removed the atk lib from the server .. re execute the leapp upgrade .. and I am getting the same thing for another package

Oct 05 10:43:59 localhost upgrade[1641]: Removing dependent packages:
Oct 05 10:44:44 localhost upgrade[1641]:  lz4    Process Process-216:
Oct 05 10:44:44 localhost upgrade[1641]: Traceback (most recent call last):
Oct 05 10:44:44 localhost upgrade[1641]:   File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
Oct 05 10:44:44 localhost upgrade[1641]:     self.run()
Oct 05 10:44:44 localhost upgrade[1641]:   File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
Oct 05 10:44:44 localhost upgrade[1641]:     self._target(*self._args, **self._kwargs)
Oct 05 10:44:44 localhost upgrade[1641]:   File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 72, in _do_run
Oct 05 10:44:44 localhost upgrade[1641]:     actor_instance.run(*args, **kwargs)
Oct 05 10:44:44 localhost upgrade[1641]:   File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 290, in run
Oct 05 10:44:44 localhost upgrade[1641]:     self.process(*args)
Oct 05 10:44:44 localhost upgrade[1641]:   File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/dnfupgradetransaction/actor.py", line 54, in process
Oct 05 10:44:44 localhost upgrade[1641]:     plugin_info=plugin_info
Oct 05 10:44:44 localhost upgrade[1641]:   File "/usr/share/leapp-repository/repositories/system_upgrade/common/libraries/dnfplugin.py", line 342, in perform_transaction_install
Oct 05 10:44:44 localhost upgrade[1641]:     cmd_prefix=cmd_prefix
Oct 05 10:44:44 localhost upgrade[1641]:   File "/usr/share/leapp-repository/repositories/system_upgrade/common/libraries/dnfplugin.py", line 219, in _transaction
Oct 05 10:44:44 localhost upgrade[1641]:     e.stdout = e.stdout.encode('utf-8', 'xmlcharrefreplace')

If you need any further log files or output of any command I can provide it.

Thanks

Raphyyy
  • 29
  • 4

2 Answers2

3

There is a bug in /usr/share/leapp-repository/repositories/system_upgrade/common/libraries/dnfplugin.py. From line 217, it should be

        except CalledProcessError as e:
            if six.PY3:
                e.stdout = e.stdout.encode('utf-8', 'xmlcharrefreplace')
                e.stderr = e.stdout.encode('utf-8', 'xmlcharrefreplace')

(so it should test for PY3, not PY2.

WanWizard
  • 2,574
  • 15
  • 13
  • why nobody fix is oh good ->> https://github.com/oamg/leapp-repository/issues/263 – user956584 Nov 18 '22 at 13:41
  • 1
    What @user956584 posted is about different issue in code. Correct issue is this one https://github.com/oamg/leapp-repository/issues/1016 and it refers to AlmaLinux specific ticket in it. (https://github.com/AlmaLinux/almalinux-deploy/issues/161) – Kris Avi Feb 28 '23 at 14:10
0

Have the exact same problem on the exact same system. Did the upgrade weeks ago, but had with the programs on this system problems after the update. So rolled back and figured out a solution, wanted to update today and now this.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Oct 17 '22 at 01:42