Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leapp preupgrade fails when the rpm database contains UTF-8 strings #51

Open
tuxmaster5000 opened this issue Feb 18, 2023 · 2 comments
Open
Labels
bug Something isn't working

Comments

@tuxmaster5000
Copy link

Actual behavior
The "leapp preupgrade" fails with an python error.

====> * vendor_signed_rpm_scanner
        Provide data about installed RPM Packages signed by Red Hat.
Process Process-250:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 72, in _do_run
    actor_instance.run(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 290, in run
    self.process(*args)
  File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/redhatsignedrpmscanner/actor.py", line 125, in process
    "Package {} is unsigned, packager: {}, signature: {}".format(pkg.name, pkg.packager, pkg.pgpsig)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 7: ordinal not in range(128)

To Reproduce
call leapp preupgrade

Expected behavior
The run without any errors

System information (please complete the following information):

  • OS and version: CentOS 7.9
  • # uname -a Linux XXX 3.10.0-1160.83.1.el7.x86_64 fixed version_id #1 SMP Wed Jan 25 16:41:43 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  • # rpm -qa "*leapp*" (or shorthashes of commits in case of manual installation):
# rpm -qa "leapp*"
Last testing version.
[leapp-0.14.0-1.el7.noarch.rpm](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-0.14.0-1.el7.noarch.rpm)                      17-Aug-2022 10:52               27696
[leapp-data-almalinux-0.1-6.el7.noarch.rpm](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-data-almalinux-0.1-6.el7.noarch.rpm)          22-Aug-2022 13:55               52216
[leapp-data-centos-0.1-6.el7.noarch.rpm](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-data-centos-0.1-6.el7.noarch.rpm)             22-Aug-2022 13:55               52112
[leapp-data-cloudlinux-0.2-2.el7.noarch.rpm](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-data-cloudlinux-0.2-2.el7.noarch.rpm)         19-Oct-2022 08:20               54740
[leapp-data-eurolinux-0.1-6.el7.noarch.rpm](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-data-eurolinux-0.1-6.el7.noarch.rpm)          22-Aug-2022 13:55               52132
[leapp-data-oraclelinux-0.1-6.el7.noarch.rpm](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-data-oraclelinux-0.1-6.el7.noarch.rpm)        22-Aug-2022 13:55               52256
[leapp-data-rocky-0.1-6.el7.noarch.rpm](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-data-rocky-0.1-6.el7.noarch.rpm)              22-Aug-2022 13:55               52212
[leapp-deps-0.14.0-1.el7.noarch.rpm](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-deps-0.14.0-1.el7.noarch.rpm)                 17-Aug-2022 10:52               10224
[leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.1.n..>](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.1.noarch.rpm) 13-Oct-2022 15:14              815800
[leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.2.n..>](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.2.noarch.rpm) 13-Oct-2022 15:13              835348
[leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.3.n..>](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.3.noarch.rpm) 19-Oct-2022 08:24              835256
[leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.4.n..>](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.4.noarch.rpm) 15-Nov-2022 15:43              844788
[leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.6.n..>](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.6.noarch.rpm) 27-Jan-2023 09:09              852748
[leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.7.n..>](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.7.noarch.rpm) 13-Feb-2023 14:00              853148
[leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.noa..>](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.noarch.rpm) 22-Sep-2022 13:45              814356
[leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevat..>](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevate.1.noarch.rpm) 13-Oct-2022 15:14               24976
[leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevat..>](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevate.2.noarch.rpm) 13-Oct-2022 15:13               25012
[leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevat..>](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevate.3.noarch.rpm) 19-Oct-2022 08:24               25016
[leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevat..>](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevate.4.noarch.rpm) 15-Nov-2022 15:43               25032
[leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevat..>](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevate.6.noarch.rpm) 27-Jan-2023 09:09               25080
[leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevat..>](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevate.7.noarch.rpm) 13-Feb-2023 14:00               25060
[leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevat..>](https://repo.almalinux.org/elevate/testing/el7/x86_64/leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevate.noarch.rpm) 22-Sep-2022 13:45               24912
[python2-leapp-0.14.0-1.el7.noarch.rpm](https://repo.almalinux.org/elevate/testing/el7/x86_64/python2-leapp-0.14.0-1.el7.noarch.rpm)              17-Aug-2022 10:52              172456
[snactor-0.14.0-1.el7.noarch.rpm](https://repo.almalinux.org/elevate/testing/el7/x86_64/snactor-0.14.0-1.el7.noarch.rpm)                    17-Aug-2022 10:52               54464

Attach (or provide link to) log files if applicable (optional - may contain confidential information):

  • All files in /var/log/leapp
  • /var/lib/leapp/leapp.db
  • journalctl
  • If you want, you can optionally send anything else would you like to provide (e.g. storage info)

For your convenience you can pack all logs with this command:

# tar -czf leapp-logs.tar.gz /var/log/leapp /var/lib/leapp/leapp.db

Then you may attach only the leapp-logs.tar.gz file.


Additional context
The critical fields in the rpm database looks like name and packager.
Command to list it:
rpm -qa --queryformat="%{=NAME} Version %{=VERSION} packager: %{=PACKAGER} \n"
As an hot fix, remove the affected packages, then it will work.

@tuxmaster5000 tuxmaster5000 added the bug Something isn't working label Feb 18, 2023
@toracat
Copy link

toracat commented Feb 18, 2023

RH links:

https://access.redhat.com/solutions/5823981
"Leapp upgrade fails to handle non UTF-8 characters gracefully"

https://bugzilla.redhat.com/show_bug.cgi?id=1917314
"Bug 1917314 - leapp process fails when running the root_scanner actor when it encounters non utf8 filenames"
Status: | CLOSED

@tuxmaster5000
Copy link
Author

In my case it is not an problem with the file system, it is one with the rpm database itself.
So 1917314 will point to another problem.(Which I don't see on my systems)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants