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

Actor dnf_package_download unexpectedly terminated #15

Open
sejohlun opened this issue Oct 12, 2022 · 19 comments
Open

Actor dnf_package_download unexpectedly terminated #15

sejohlun opened this issue Oct 12, 2022 · 19 comments
Labels
bug Something isn't working

Comments

@sejohlun
Copy link

sejohlun commented Oct 12, 2022

Actual behavior
The migration from CentOS 7 to Rocky Linux 8 fails with error:

Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Process Process-476:
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
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Process Process-476:
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

Actor dnf_package_download unexpectedly terminated with exit code: 1 - Please check the above details

===============================================================================

**To Reproduce**
install 'leapp'
run 'leapp upgrade --debug'
See error

**Expected behavior**
Successful migration

**System information (please complete the following information):**
CentOS Linux release 7.9.2009 (Core)
Linux op5.vallentuna.local 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
leapp-0.14.0-1.el7.noarch
leapp-deps-0.14.0-1.el7.noarch
leapp-data-rocky-0.1-6.el7.noarch
leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.noarch
leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevate.noarch

Filesystem                       Type      Size  Used Avail Use% Mounted on
devtmpfs                         devtmpfs  1.9G     0  1.9G   0% /dev
tmpfs                            tmpfs     1.9G     0  1.9G   0% /dev/shm
tmpfs                            tmpfs     1.9G   21M  1.9G   2% /run
tmpfs                            tmpfs     1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/mapper/vg_op5system-lv_root xfs        78G   32G   47G  41% /
/dev/sda1                        ext4      488M  115M  338M  26% /boot
tmpfs                            tmpfs     379M     0  379M   0% /run/user/0

===============================================================================



@sejohlun sejohlun added the bug Something isn't working label Oct 12, 2022
@andrewlukoshko
Copy link
Member

Let's try to all EPEL support to your configuration.
Create the following files in /etc/leapp/files/vendors.d/:

epel_map.json

{
    "datetime": "202204020934Z",
    "version_format": "1.0.0",
    "mapping": [
        {
            "source_major_version": "7",
            "target_major_version": "8",
            "entries": [
                {
                    "source": "epel",
                    "target": [
                        "epel"
                    ]
                }
            ]
        }
    ],
    "repositories": [
        {
            "pesid": "epel",
            "entries": [
                {
                    "arch": "x86_64",
                    "repoid": "epel",
                    "channel": "ga",
                    "repo_type": "rpm",
                    "major_version": "8"
                },
                {
                    "arch": "x86_64",
                    "repoid": "epel",
                    "channel": "ga",
                    "repo_type": "rpm",
                    "major_version": "7"
                }
            ]
        }
    ]
}

epel_pes.json

{
    "legal_notice": "Copyright (c) 2022 AlmaLinux OS Foundation",
    "packageinfo": [],
    "timestamp": "202207130941Z"
}

epel.repo

[epel]
name=Extra Packages for Enterprise Linux 8 - $basearch
metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-8&arch=$basearch
enabled=1
gpgcheck=1
countme=1
gpgkey=https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8

epel.sigs

24c6a8a7f4a80eb5
6a2faea2352c64e5

Then do as usual:

leapp preuprade
leapp upgrade

@sejohlun
Copy link
Author

sejohlun commented Oct 12, 2022

Same result:
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Process Process-476:
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

==================================================================================
Actor dnf_package_download unexpectedly terminated with exit code: 1 - Please check the above details

1 similar comment
@sejohlun
Copy link
Author

Same result:
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Process Process-476:
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

==================================================================================
Actor dnf_package_download unexpectedly terminated with exit code: 1 - Please check the above details

@trpl7
Copy link

trpl7 commented Oct 18, 2022

Same problem trying to upgrade from CentOS 7 to AlmaLinux 8 using elevate-cpanel

Process Process-476:
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
=====================================================================================================
Actor dnf_package_download unexpectedly terminated with exit code: 1 - Please check the above details
=====================================================================================================



@MarcelRei
Copy link

I get the same error trying to upgrade from CentOS7 to Rocky.
I tried the above mentioned fix but that didn't help.

@kludgeaudio
Copy link

Same problem here on six different machines, but another four machines with similar configurations are fine. Removing all epel packages (and all systems have one or two) and then re-running leapp upgrade does not help. Any idea at all what is going on or if there is any kind of upgrade? In our case it appears to have done all the downloads before this happens so if we could just bypass the rest of the module and go to the next one we might even be okay.

@zaheerabbas1988
Copy link

Same result: Running transaction check Transaction check succeeded. Running transaction test The downloaded packages were saved in cache until the next successful transaction. You can remove cached packages by executing 'dnf clean packages'. Process Process-476: 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

==================================================================================

Actor dnf_package_download unexpectedly terminated with exit code: 1 - Please check the above details

The issue might be with the old python installation. Try removing python2* and python3* packages and then try again.

@tjyang
Copy link

tjyang commented Nov 26, 2022

Pardon the formatting, I had hard time to include info in details tags.

Once I updated the leapp to latest 0.14 I have same issue on centos 7.9.

  • With older 0.12 version elevate, I don't see this dnf_package_download actor issue.
root@centos7t01 ~]# rpm -qa |grep leapp leapp-0.12.1-100.20210924142320684911.master.28.g1f03432.el7.noarch python2-leapp-0.12.1-100.20210924142320684911.master.28.g1f03432.el7.noarch leapp-deps-0.12.1-100.20210924142320684911.master.28.g1f03432.el7.noarch leapp-upgrade-el7toel8-0.14.0-100.202109271224Z.b7ebfca.master.el7.elevate.noarch leapp-data-rocky-0.1-4.el7.noarch leapp-upgrade-el7toel8-deps-0.14.0-100.202109271224Z.b7ebfca.master.el7.elevate.noarch [root@centos7t01 ~]#
  • But the older version, I see "more space is needed on the / filesystem"

installing package nss-softokn-freebl-3.79.0-10.el8_6.i686 needs 2728MB on the / filesystem
installing package nss-softokn-freebl-3.79.0-10.el8_6.i686 needs 4913 inodes on the / filesystem

Error Summary

Disk Requirements:
At least 2748MB more space needed on the / filesystem.

Debug output written to /var/log/leapp/leapp-upgrade.log

Adding epel* in /etc/leapp/files/vendors.d/ fix didn't fix the issue.

2022-11-26 11:57:20.313 DEBUG PID: 10582 leapp.workflow.Download.dnf_package_download: Cleaning up mounts
2022-11-26 11:57:20.314 DEBUG PID: 10582 leapp.workflow.Download.dnf_package_download: Recursively removing scratch directory /var/lib/leapp/scratch.
2022-11-26 11:57:20.351 DEBUG PID: 10582 leapp.workflow.Download.dnf_package_download: Recursively removed scratch directory /var/lib/leapp/scratch.
Process Process-476:
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

Answerfile has been generated at /var/log/leapp/answerfile
[root@centos7t01 ~]#

  • end

@MarcelRei
Copy link

My issue was related to "disk space" so I increased the size
export LEAPP_OVL_SIZE=3000

and the other one was related to an openssl lib which was only el7 and I had to remove first.

@tjyang
Copy link

tjyang commented Nov 26, 2022

My issue was related to "disk space" so I increased the size export LEAPP_OVL_SIZE=3000

and the other one was related to an openssl lib which was only el7 and I had to remove first.

@MarcelRei , what version of leapp were you using when ran into disk pace issue ?
0.12 or 0.14 ?

@tjyang
Copy link

tjyang commented Nov 26, 2022

I create a centos 7.9 VMWare VM from CentOS-7-x86_64-Minimal-2009 with no extra software installation beside leapp*.
And leapp upgrade passed, I got a RL8.7. This is good to know that version 0.14 leapp from elevate is OK.

[me@centos7t02 ~]$ rpm -qa |grep leapp
leapp-data-rocky-0.1-6.el7.noarch
python2-leapp-0.14.0-1.el7.noarch
leapp-0.14.0-1.el7.noarch
leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.1.noarch
leapp-repository-deps-el8-5.0.8-100.202203181036Z.249925a3.master.el8.noarch
leapp-deps-el8-5.0.8-100.202203181036Z.249925a3.master.el8.noarch
[me@centos7t02 ~]$ cat /etc/redhat-release ;date
Rocky Linux release 8.7 (Green Obsidian)
Sat Nov 26 12:40:43 CST 2022
[me@centos7t02 ~]$ df -lh
Filesystem               Size  Used Avail Use% Mounted on
devtmpfs                 3.8G     0  3.8G   0% /dev
tmpfs                    3.8G     0  3.8G   0% /dev/shm
tmpfs                    3.8G  856K  3.8G   1% /run
tmpfs                    3.8G     0  3.8G   0% /sys/fs/cgroup
/dev/mapper/centos-root   35G  2.4G   33G   7% /
/dev/sda1               1014M  222M  793M  22% /boot
tmpfs                    777M     0  777M   0% /run/user/1000
[me@centos7t02 ~]$


@MarcelRei
Copy link

My issue was related to "disk space" so I increased the size export LEAPP_OVL_SIZE=3000
and the other one was related to an openssl lib which was only el7 and I had to remove first.

@MarcelRei , what version of leapp were you using when ran into disk pace issue ? 0.12 or 0.14 ?

I was using leapp 0.14 but still ran into the issue mentioned above. I just checked the logs better to find the issue.

@tjyang
Copy link

tjyang commented Nov 28, 2022

My issue was related to "disk space" so I increased the size export LEAPP_OVL_SIZE=3000
and the other one was related to an openssl lib which was only el7 and I had to remove first.

@MarcelRei , what version of leapp were you using when ran into disk pace issue ? 0.12 or 0.14 ?

I was using leapp 0.14 but still ran into the issue mentioned above. I just checked the logs better to find the issue.

disk space issue still exists in 0.14 version. Thanks for this infomation.

@kludgeaudio
Copy link

kludgeaudio commented Nov 28, 2022 via email

@vwbusguy
Copy link

Try removing python2* and python3* packages and then try again.

This ended up being my issue.

I have found that a workaround is to look at /var/log/leapp/leapp-upgrade.log, or for preupgrade, the leapp-preupgrade.log. Start at the bottom, go from the syntax error up through all of the dismount and cleanup stuff and you will, maybe 50 lines from the end, find some kind of actual error message. It is sometimes hidden but it's likely to be there.

Thanks! This is how I found out what the exact issue was. Turned out to be a python library incompatibility and it was buried in that log file.

@tjyang
Copy link

tjyang commented Dec 10, 2022

My understanding so far for solution.

  • workaround: to avoid crashing the error handler, remove pkg conflicts in advance.
  • Fix the error handler.

@vwbusguy
Copy link

  • remove pkg conflicts in advance

I'm curious if the logic of dnf system-upgrade download could possibly help here. Or at least showing the package conflict errors in stderr rather than buried in the log file.

@danFbach
Copy link

  • remove pkg conflicts in advance

I'm curious if the logic of dnf system-upgrade download could possibly help here. Or at least showing the package conflict errors in stderr rather than buried in the log file.

I would agree with this. If package conflicts can be removed automatically, remove them. If not, at least better inform the user. I, and others, have encountered this issue, that were all resolved by removing conflicting packages.
The common reported error seems to be:

Risk Factor: high
Title: Packages from unknown repositories may not be installed
Summary: 1 packages may not be installed or upgraded due to repositories unknown to leapp:
- kernel-uek (repoid: ol8-uek)

However, no information is given immediately to the user that this occurred because of conflicting packages, and one must dig into leapp-upgrade.log in order to find the information. For me and many others, it was python conflicts, but i've seen it occur with other packages.

@kludgeaudio
Copy link

kludgeaudio commented Dec 30, 2022 via email

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

9 participants