AlmaLinux / almalinux-deploy

EL to AlmaLinux migration tool.
GNU General Public License v3.0
543 stars 72 forks source link

"leapp update" failed on python problem after final package downloading #161

Closed Xingeqwd closed 1 year ago

Xingeqwd commented 1 year ago

Foreword Hello there, i got some problem here. and think i need help... After sloving nearing ten problems, it's finally almost reach the end, but here comes a another problem here i cant handle
Condition overview When i processing the “leapp upgrade” on my Centos7.9 (roughly in accordance with this guidance of almaLinux to transfrom my system to almalinux), It always return error like this(seems like a python functioning programical problem?_like picture showned below) image text is like:


The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Process Process-473:
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/dnfpackagedownload/actor.py", line 51, in process
    xfs_info=xfs_info, storage_info=storage_info, plugin_info=plugin_info, on_aws=on_aws
  File "/usr/share/leapp-repository/repositories/system_upgrade/common/libraries/dnfplugin.py", line 385, in perform_rpm_download
    test=True, on_aws=on_aws
  File "/usr/share/leapp-repository/repositories/system_upgrade/common/libraries/dnfplugin.py", line 219, in _transaction
    e.stdout = e.stdout.encode('utf-8', 'xmlcharrefreplace')
AttributeError: can't set attribute

That's so strange, right? Normally, this shouldn't have this kind of problem.......
Tried of solution (Similar problems have occurred before, but it should be a problem with my local python, and it will be solved after reinstalling) like this github link showned. (Actually speaking, that is the first question spqwned, six or seven before now...) But on this time, these method(and similar) seems useless

BTW, another master on chat.almalinux.org told me to try the evaluation version scriept, but it didn't work, the error condition persists
Files i thought these haven't sensitive content in it, for the sake of convenience, I put it up leapp-report.txt leapp-upgrade.log
Others Could someone help me please? Or any ideas are welcome! Thanks a lot to everyone for the generous help and patient reading! Wish you have a good good day.

Xingeqwd commented 1 year ago

In fact, I also posted a post on "leapp-repository" the article link And a master there told me that this is a problem unique to almalinux scripts,

It seems to me that this is indeed the case. The problem lies in the 218 of your script GitHub link to dnfplugin.py#218

As the master said there github link to the comment I can only seek here for help

Xingeqwd commented 1 year ago

Additional speaking, by the way, after asking questions to leeapp-repository to no avail, I also tried to post on almalinux.discourse.group, But it's seems that they are too strict with newcomers, the autometic system there even blocked my account, so that I cannot post anything there image This really hit me hard-hard😥
I hvae also sent these in that chat room chat.almalinux.org but got no result (Actually, a master there asked me to try the evaluation version, but it didn't work_error condition persists), So I come here to seek for help

And, Finally,no matter what, thanks to everyone! wish you have a good good day and life

Xingeqwd commented 1 year ago

Thanks to the master "Andrew Lukoshko" in the chat room chat.almalinux ", he help me to compile and launch an evaluation version of the script (6th), and this problem was solved.

In addition, there is another problem (as shown in the photo) spawned on actor of Actor: dnf_package_download Message: DNF execution failed with non zero exit code. image I'll try to solve it myself, if it doesn't work, come here and ask again.

no matter what...... thanks to everyone!

Xingeqwd commented 1 year ago

Well, this problem has been solved (although a new problem has been created),

Please allow me to put the solution to this problem, it worked for me, hope it will be useful for others (Actually, it’s just a recording of the speeches of a few bigwigs. Could I post these? If I dont permitted to post it, I can delete it, please contact me)

Here is the solution to the problem of this post

Andrew Lukoshko @xingeqwd please recheck your migration with latest RPMs from ELevate testing. package should be leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.6

This is the solution to the first problem generated after this thread's problem was solved

as the workflow offered by redhat image i thought, this error should be happends on check image (2) (It appears in early and after many checks)

rprilipskii Hello. That seems familiar to what I've encountered before. Does the /var/lib/leapp/el8userspace directory exist, can it be removed manually? If it's like what I encountered, it likely can't, due to being either mounted or opened by some process.

In fact, the most likely case is that it remained mounted from a previous upgrade run, where the target userspace was created, overlay FS got mounted, but the process halted later on and the dismount did not happen. In the future, fuser or lsof should help you figure out what's holding the directory busy if it's not immediately clear. Or if you don't want to spend time on diagnostics, rebooting will clear the temporary mounts too.

My system is centos7.9, trying to transfer to almalinux8, I hope it can help people later!

Xingeqwd commented 1 year ago

BTW, i create another post on This GitHub link for the new issue

Cough Cough, if there are someone wonder for this? Please move on to watch

MarcelNagy commented 1 year ago

Hi Xingeqwd, I have the same problem. Can you help me solve this problem? Where can I find the leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.6 package? I only found leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.1 on this page https://repo.almalinux.org/elevate/el7/x86_64/. Could you please help me? Thank you very much

Xingeqwd commented 1 year ago

Hi Xingeqwd, I have the same problem. Can you help me solve this problem? Where can I find the leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.6 package? I only found leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.1 on this page https://repo.almalinux.org/elevate/el7/x86_64/. Could you please help me? Thank you very much

hello @MarcelNagy!

Sure thing i would certainly help you. You only need to run "yum install leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.6" to use this, men, that is such a simple method, and the master who made it is really a good man.

There are still sooooo many problem in future, man. And fortunately, I have approximately completed all of these. You can visit more issue on the issue of my mainly page(by clicking on my avatar)

By The Way, you can also visit this chat site to asking more master (if you need). there are really a lot of master here and they arereally hornally good guys.

Haha, glad to help you, let's Strike into the front! And finally, wish you success!

MarcelNagy commented 1 year ago

Thanks, but when I run "yum install leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.6" it says "No package leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.6 available". I try your next advice. I will visit chat.almalinux.org.

Xingeqwd commented 1 year ago

Thanks, but when I run "yum install leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.6" it says "No package leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.6 available". I try your next advice. I will visit chat.almalinux.org. Hello

I originally thought this should be a spelling problem, but after checked i foud that it isn't

And otherwise, if you are migrating from Centos to AlmaLinux, you should follow this almalinux guidance, and running the yum install leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.6 before you running the leapp (pre)upgrade

I thought it should because you missing some upper step in the guidance, your system is lacking the elevate-testing.repo, This causing the yum didn't found the 'leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.6' packages You can follow the guidance to download(import) the repo, key and etc, this should help to solve the problem.

It's amazing to meet people with similar problems to me, it makes me excited, haha

atefhares commented 1 year ago

@Xingeqwd I have similar issues first I tried this solution https://stackoverflow.com/a/74034084/5993410 and it helped me solving the "can't set attribute" error. and also used testing elevate package leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.6 by following this https://wiki.almalinux.org/elevate/ELevate-testing-guide.html

but it still fails with the following error. if you understand the issue, could you plz help?

No matches found for the following disable plugin patterns: subscription-manager
552.3697741 upgrade[565]: Repository extras is listed more than once in the configuration
552.3650621 upgrade[565]: Warning: Package marked by Leapp to upgrade not found in repositories metadata: gpg-pubkey
552.3653101 upgrade[5651: Error unpacking rpm package python2-urilib3-1.24.2-3.module+el8.5.0+706+735ec463. noarch
552.3655671 upgrade[5651: Error: Transaction failed
image
Xingeqwd commented 1 year ago

@Xingeqwd I have similar issues first I tried this solution https://stackoverflow.com/a/74034084/5993410 and it helped me solving the "can't set attribute" error. and also used testing elevate package leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.6 by following this https://wiki.almalinux.org/elevate/ELevate-testing-guide.html

but it still fails with the following error. if you understand the issue, could you plz help?

No matches found for the following disable plugin patterns: subscription-manager
552.3697741 upgrade[565]: Repository extras is listed more than once in the configuration
552.3650621 upgrade[565]: Warning: Package marked by Leapp to upgrade not found in repositories metadata: gpg-pubkey
552.3653101 upgrade[5651: Error unpacking rpm package python2-urilib3-1.24.2-3.module+el8.5.0+706+735ec463. noarch
552.3655671 upgrade[5651: Error: Transaction failed
image

Hello @atefhares. Sure, man, i will certainly help you!

Honestly, i have no sure way, but If i were you, man, I will delete the subscription-manager first to make this problem easier(looks simpler) Because of we are centos, suscription have no use to us, i delete this in the first time when i using the leapp upgrade

And regarding the python-urllib, i thought that might be caused by a broken installation. you can easily try to reinstall the Python2-urllib(eg. using the yum remove python2-urllib; yum install python2-urllib), If these dont work, try to reinstall python2*(using the yum reinstall instread of remove/install !!!!! deleting all the python2 Should causing a huge huge trouble). After these, try to using the yum update. I think this above should be effective(at least hope that)

ByTheWay, if i reply you late, you can also visit the Almalinux discussion room to ask the master there(they are really good guies). or you can also create a issue on "leapp" repository, there are also many good man there to help!

Hope these above work! wish you a good day and luck. Ready for the many many question in the front, these should be easily solved, strike them! And feel free to ask me again, haha.

atefhares commented 1 year ago

@Xingeqwd Thanks a lot for your help. I am trying what you suggested and will also try to communicate with the team on MM. will update here again the status.