Leapp upgrade fails with "Cannot obtain data about the DNF configuration" while in reboot phase
Environment
- Red Hat Enterprise Linux 7
- leapp
- JBoss Core Services
Issue
-
After rebooting the system on the Upgrade entry to effectively upgrade the system, the upgrade happens then fails with the following error message printed on the console
[ERROR] Actor: dnf_upgrade_transaction Message: Cannot obtain data about the DNF configuration Summary: Stderr: Traceback (most recent call last): File "/usr/lib64/python3.6/site-packages/libdnf/error.py", line 14, in swig_import_helper return importlib.import_module(mname) File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 994, in _gcd_import File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 658, in _load_unlocked File "<frozen importlib._bootstrap>", line 571, in module_from_spec File "<frozen importlib._bootstrap_external>", line 922, in create_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed ImportError: libbrotlidec.so.1: cannot open shared object file: No such file or directory During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/dnf", line 57, in <module> from dnf.cli import main File "/usr/lib/python3.6/site-packages/dnf/__init__.py", line 30, in <module> import dnf.base File "/usr/lib/python3.6/site-packages/dnf/base.py", line 29, in <module> import libdnf.transaction File "/usr/lib64/python3.6/site-packages/libdnf/__init__.py", line 8, in <module> from . import error File "/usr/lib64/python3.6/site-packages/libdnf/error.py", line 17, in <module> _error = swig_import_helper() File "/usr/lib64/python3.6/site-packages/libdnf/error.py", line 16, in swig_import_helper return importlib.import_module('_error') File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ModuleNotFoundError: No module named '_error'
Resolution
If you didn't reboot to perform the upgrade yet, follow the procedure described in the Diagnostic Steps section to confirm whether you will hit the issue or not. If you will hit the issue, apply the workaround.
If you already rebooted the system and are currently getting the emergency prompt and error message, follow the procedure described in the Recovery sub-section of this section.
Workaround
-
Make sure
brotlipackage is part of the transaction# echo brotli >> /etc/leapp/transaction/to_install -
Execute
leapp upgradeagain# leapp upgrade [...] -
Confirm
brotlipackage is part of the transaction# grep dnf_dry_run /var/log/leapp/leapp-upgrade.log | grep -w brotli --> some output -
Reboot to effectively upgrade the system
If no output was present in previous step, don't reboot the system, but open a case on the Customer Portal referencing this solution.
# reboot
Recovering the system
-
Revert to a snapshot prior to upgrade
-
Apply the workaround
Root Cause
The issue will happen as soon as jbcs-httpd24-brotli is installed on the system. The issue is tracked by the following Jiras:
Diagnostic Steps
-
Check if
jbcs-httpd24-brotliis installed on the system# rpm -qa | grep jbcs-httpd24-brotli --> some output
If the package is installed on the system, proceed to Resolution section.
Otherwise the issue described in this solution doesn't apply to your system.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.