Comments (6)
Hi Bocekm!
Thanks for your work!
Now v0.17 works fine to me, but still need to temporarily remove abrt and libreport before convert2rhel, otherwise the whole convert2rhel would hit dependency issue.
BR!
from convert2rhel.
Copyright © 2010 Red Hat, Inc. All rights reserved. "Red Hat" and the Red Hat "Shadowman" logo are registered trademarks of Red Hat, Inc. "Linux" is a registered trademark of Linus Torvalds. All other trademarks are the property of their respective owners.
WARNING - By continuing you accept this EULA.
Continue with the system conversion? [y/n]: y
[01/31/2021 17:41:29] TASK - [Prepare: Gather system information] *******************************
Name: Red Hat Enterprise Linux Server
OS major version: 7
[01/31/2021 17:41:29] DEBUG - Calling command 'uname -i'
Architecture: x86_64
Config filename: red-7-x86_64.cfg
[01/31/2021 17:41:29] CRITICAL - Current combination of system distribution and architecture is not supported for the conversion to RHEL.
[01/31/2021 17:41:29] DEBUG - Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/convert2rhel/main.py", line 65, in main
systeminfo.system_info.resolve_system_info()
File "/usr/lib/python2.7/site-packages/convert2rhel/systeminfo.py", line 79, in resolve_system_info
self.cfg_content = self._get_cfg_content()
File "/usr/lib/python2.7/site-packages/convert2rhel/systeminfo.py", line 117, in _get_cfg_content
return self._get_cfg_section("system_info")
File "/usr/lib/python2.7/site-packages/convert2rhel/systeminfo.py", line 127, in _get_cfg_section
self.logger.critical("Current combination of system distribution"
File "/usr/lib/python2.7/site-packages/convert2rhel/logger.py", line 105, in critical
sys.exit(msg)
SystemExit: Current combination of system distribution and architecture is not supported for the conversion to RHEL.
No changes were made to the system.
from convert2rhel.
Hi @jerry-wjl, sorry for the troubles and thanks for taking the time for filing the issue.
The system-release package is actually an alias for the centos-release package on CentOS systems. On RHEL it is translated to redhat-release.
In order to allow convert2rhel to run again, copy the backed up /etc/system-release file to the original location (and overwrite the RHEL one you have there now):
# cp /var/lib/convert2rhel/system-release /etc/
Then, download and installed the recently released version 0.16: https://github.com/oamg/convert2rhel/releases/tag/v0.16. In this version we're reworked the way we treat the centos-release package during the conversion.
I've tried your scenario (CentOS 7.9 with kernel-3.10.0-1160.el7.x86_64) with the command convert2rhel --disable-submgr --enablerepo rhel-7.9 --debug
and it runs fine with the latest convert2rhel version.
Let me know whether it works for you.
from convert2rhel.
Hi Bocekm, Thanks for your update.
I tested the new version of convert2rhel(0.16), but hit the same issue as before. Pls check output below:
[02/09/2021 13:37:12] DEBUG - Downloading the kernel-3.10.0-1160.el7 package.
[02/09/2021 13:37:12] DEBUG - Calling command 'yumdownloader -v --destdir="/var/lib/convert2rhel/" --disablerepo="" --enablerepo="rhel-7.9" --releasever=7Server kernel-3.10.0-1160.el7'
[02/09/2021 13:37:12] DEBUG - Pseudo-PTY columns set to: (0, 120)
Successfully downloaded the kernel-3.10.0-1160.el7 package.
[02/09/2021 13:37:13] DEBUG - Path of the downloaded package: /var/lib/convert2rhel/kernel-3.10.0-1160.el7.x86_64.rpm
Replacing CentOS Linux kernel-3.10.0-1160.el7 with RHEL kernel with the same NEVRA ...
[02/09/2021 13:37:13] DEBUG - Calling command 'rpm -i --force --replacepkgs /var/lib/convert2rhel/kernel-3.10.0-1160.el7'
CRITICAL - Unable to replace the kernel package: error: Failed dependencies:
system-release is needed by kernel-3.10.0-1160.el7.x86_64
[02/09/2021 13:37:13] DEBUG - Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/convert2rhel/main.py", line 88, in main
post_ponr_conversion()
File "/usr/lib/python2.7/site-packages/convert2rhel/main.py", line 196, in post_ponr_conversion
pkghandler.preserve_only_rhel_kernel()
File "/usr/lib/python2.7/site-packages/convert2rhel/pkghandler.py", line 513, in preserve_only_rhel_kernel
kernel_update_needed = install_rhel_kernel()
File "/usr/lib/python2.7/site-packages/convert2rhel/pkghandler.py", line 553, in install_rhel_kernel
handle_no_newer_rhel_kernel_available()
File "/usr/lib/python2.7/site-packages/convert2rhel/pkghandler.py", line 575, in handle_no_newer_rhel_kernel_available
replace_non_rhel_installed_kernel(installed[0])
File "/usr/lib/python2.7/site-packages/convert2rhel/pkghandler.py", line 626, in replace_non_rhel_installed_kernel
loggerinst.critical("Unable to replace the kernel package: %s" % output)
File "/usr/lib/python2.7/site-packages/convert2rhel/logger.py", line 106, in critical
sys.exit(msg)
SystemExit: Unable to replace the kernel package: error: Failed dependencies:
system-release is needed by kernel-3.10.0-1160.el7.x86_64
WARNING - Conversion process interrupted and manual user intervention will be necessary.
I believe the job can go on if convert2rhel ignores the rpm dependency check when replace old kernel, that means the command:
'rpm -i --force --replacepkgs /var/lib/convert2rhel/kernel-3.10.0-1160.el7*'
should be modified to:
'rpm -i --force --nodeps --replacepkgs /var/lib/convert2rhel/kernel-3.10.0-1160.el7*'
So I grep and manually modified 2 py files:
1, /usr/lib/python2.7/site-packages/convert2rhel/pkghandler.py change the line below to:
'rpm -i --force --nodeps --replacepkgs %s*' % os.path.join(utils.TMP_DIR, pkg),
2, /usr/lib/python2.7/site-packages/convert2rhel/utils.py change the line below to:
cmd_param.append("--replacepkgs --nodeps")
Then recover the system-release from /var/lib/convert2rhel/backup and run the convert job again, then it works fine.
On the other hand, in my testing lab I found convert2rhel would hit dependency issue when the original centos server has abrt and libreport and relevant pkg installed, which may cause convert2rhel failed finally, so it should be removed before running convert2rhel, eg:
yum remove abrt-* libreport-*
Of course these pkgs can be installed after convert2rhel job successfully done.
Below are some outputs:
Error: Package: libreport-web-2.1.11-53.el7.centos.x86_64 (@anaconda/7)
Requires: libreport = 2.1.11-53.el7.centos
Removing: libreport-2.1.11-53.el7.centos.x86_64 (@anaconda/7)
libreport = 2.1.11-53.el7.centos
Downgraded By: libreport-2.1.11-53.el7.x86_64 (rhel-7.9)
libreport = 2.1.11-53.el7
Error: Package: libreport-cli-2.1.11-53.el7.centos.x86_64 (@anaconda/7)
Requires: libreport = 2.1.11-53.el7.centos
Removing: libreport-2.1.11-53.el7.centos.x86_64 (@anaconda/7)
libreport = 2.1.11-53.el7.centos
Downgraded By: libreport-2.1.11-53.el7.x86_64 (rhel-7.9)
libreport = 2.1.11-53.el7
You could try using --skip-broken to work around the problem
** Found 4 pre-existing rpmdb problem(s), 'yum check' output follows:
abrt-cli-2.1.11-60.el7.centos.x86_64 has missing requires of libreport-centos >= ('0', '2.1.11', '46')
abrt-cli-2.1.11-60.el7.centos.x86_64 has missing requires of libreport-plugin-mantisbt >= ('0', '2.1.11', '46')
abrt-desktop-2.1.11-60.el7.centos.x86_64 has missing requires of libreport-centos >= ('0', '2.1.11', '46')
abrt-desktop-2.1.11-60.el7.centos.x86_64 has missing requires of libreport-plugin-mantisbt >= ('0', '2.1.11', '46')
---> Package nettle.i686 0:2.7.1-8.el7 will be installed
--> Finished Dependency Resolution
Error: Package: abrt-retrace-client-2.1.11-60.el7.centos.x86_64 (@anaconda/7)
Requires: abrt = 2.1.11-60.el7.centos
Removing: abrt-2.1.11-60.el7.centos.x86_64 (@anaconda/7)
abrt = 2.1.11-60.el7.centos
Downgraded By: abrt-2.1.11-60.el7.x86_64 (rhel-7.9)
abrt = 2.1.11-60.el7
You could try using --skip-broken to work around the problem
** Found 4 pre-existing rpmdb problem(s), 'yum check' output follows:
abrt-cli-2.1.11-60.el7.centos.x86_64 has missing requires of libreport-centos >= ('0', '2.1.11', '46')
abrt-cli-2.1.11-60.el7.centos.x86_64 has missing requires of libreport-plugin-mantisbt >= ('0', '2.1.11', '46')
abrt-desktop-2.1.11-60.el7.centos.x86_64 has missing requires of libreport-centos >= ('0', '2.1.11', '46')
abrt-desktop-2.1.11-60.el7.centos.x86_64 has missing requires of libreport-plugin-mantisbt >= ('0', '2.1.11', '46')
from convert2rhel.
Hi Jerry, thanks for the suggestion. You're right. Under typical circumstances, kernel is installed using yum and with that the system-release/redhat-release pkg is installed as a dependency. However when the CentOS kernel and RHEL kernel have completely the same version, we install it through rpm which causes this error because system-release/redhat-release is not installed at that point.
I'll provide a fix for that shortly. By the way, the change to utils.py
is not necessary as the function install_pkgs
does not handle kernel.
And I'll check the abrt and others later on.
from convert2rhel.
The abrt-related error root cause: a package from a standard base CentOS repo is installed (in this case it's the abrt-retrace-client) but in RHEL it's available in the Optional repo which is typically not used/enabled for the conversion.
Details of the issue:
- installing abrt-cli on CentOS draws in the abrt-retrace-client
- abrt.x86_64 0:2.1.11-60.el7.centos is being downgraded to abrt.x86_64 0:2.1.11-60.el7 (yes, the additional .centos means for yum that it is a package of a higher version)
- abrt-retrace-client depends on the abrt.x86_64 0:2.1.11-60.el7.centos being downgraded, but since abrt-retrace-client is not available in the enabled base RHEL 7 repo, it is supposed to stay as is on the system => hence the conflict
Another workaround, as alternative to removing the abrt package manually = enable the RHEL Optional repo (convert2rhel --disable-submgr --disablerepo "*" --enablerepo rhel-7-server-rpms --enablerepo=rhel-7-server-optional-rpms
).
from convert2rhel.
Related Issues (20)
- Convert 2 RHEL offline HOT 1
- centos7.4 ---> rhel7.4 HOT 3
- Disabling repositories fails if there are no repositories available through subscriptions HOT 6
- test issue
- CentOS7.4 update to RHEL7.4? HOT 1
- Feature Request: reduce timeout for the 'Checking internet connectivity' check HOT 1
- Convert2rhel failed to convert Rocky 8.9 to rhel 8.9 on Satellete server HOT 5
- `EFI::UNEXPECTED_ERROR` when `blkid -p -s PART_ENTRY_NUMBER` is empty HOT 1
- Exception on Alma/Rocky 8.9 HOT 1
- Version 9.3 not supported yet HOT 2
- Passing environment variables HOT 2
- No changes were made to the system HOT 1
- Convert failed HOT 2
- MySQL downgrade after conversion, service won't start HOT 4
- convert2rhel migration error HOT 4
- Convert2Rhel Migration from Rocky Error HOT 4
- FYI, converting from Rocky 8, issue with packages that have periods in the name HOT 2
- Support for EL9 based clones to convert to RHEL9 HOT 2
- convert2rhel silently hangs if too many (list too long) third-party packages HOT 2
- Error Message if LIST_THIRD_PARTY_PACKAGES HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from convert2rhel.