Open mdc-webdb opened 3 weeks ago
Hello!
I wasn't able to reproduce this situation. But it feels to me like subscription-manager
problem more than problem of convert2hel
.
From Dieses System ist bereits registriert.
I think the system was registered prior to the conversion, so the subscription-manager
was already installed.
Could you share the full convert2rhel log (can be found in /var/log/convert2rhel/convert2rhel.log
) or if you don't feel comfortable sharing it here, you can create Jira issue in our project: https://issues.redhat.com/projects/RHELC/summary (unfortunately, the provider of the Jira has some outages now) and add the log there.
Thanks!
Because https://issues.redhat.com/projects/RHELC/summary is current broken, I have added the log files here. log.tar.gz
When I simple create the missing syspurpose.json via:
mkdir -p /etc/rhsm/syspurpose
touch /etc/rhsm/syspurpose/syspurpose.json
Then no python exception will occurs, but another error message:
[2024-06-19T13:53:44+0000] TASK - [Prepare: Subscription Manager - Disable all repositories] ***** CRITICAL - Could not disable subscription-manager repositories: This system has no repositories available through subscriptions.
ERROR - (ERROR) SUBSCRIBE_SYSTEM::FAILED_TO_DISABLE_SUBSCRIPTION_MANAGER_REPOSITORIES - Could not disable repositories through subscription-manager. Description: As part of the conversion process, convert2rhel disables all current subscription-manager repositories and enables only repositories required for the conversion. convert2rhel was unable to disable these repositories, and the conversion is unable to proceed. Diagnosis: Failed to disable repositories: This system has no repositories available through subscriptions. . Remediations: N/A
ERROR - Skipped ENSURE_KERNEL_MODULES_COMPATIBILITY. Skipped because SUBSCRIBE_SYSTEM was not successful ERROR - Skipped VALIDATE_PACKAGE_MANAGER_TRANSACTION. Skipped because ENSURE_KERNEL_MODULES_COMPATIBILITY and SUBSCRIBE_SYSTEM were not successful Writing breadcrumbs to '/etc/migration-results'. Writing RHSM custom facts to '/etc/rhsm/facts/convert2rhel.facts'. WARNING - Abnormal exit! Performing rollback .
Looked over it and I'm able to reproduce it.
The problem is, that you have missing /etc/rhsm/syspurpose
and /etc/rhsm/syspurpose/valid_fields.json
. This will result in this type of error of missing the /etc/rhsm/syspurpose/syspurpose.json
(and that's why I wasn't able to reproduce it - removing just the /etc/rhsm/syspurpose/syspurpose.json
won't cause the error).
What helped me in the testing env was to reinstall the yum reinstall python-syspurpose
package which owns those files. But I don't know why you don't have those on your system and if it could have some side effects.
Overall after reinstalling the python-syspurpose
the unregistration should work.
An reinstall of if will not fix it :(
After:
yum reinstall python-syspurpose
/etc/rhsm/syspurpose/syspurpose.json will be an empty json file containing only "{}".
But the error of "convert2rhel analyze" will be same as on https://github.com/oamg/convert2rhel/issues/1269#issuecomment-2178515403
The error message is also totally bizarre.
This system has no repositories available through subscriptions. Failed to disable repositories: This system has no repositories available through subscriptions.
How can something be disabled that is not there? And there is no repo stored for the activation_key, as the website says that this is not necessary as the basic repos are always active.
Hmm, I think there must be at least rhel-7-server-rpms
available, otherwise you don't have access to the basic RHEL packages. And when we don't have access, we cannot try to do dry-run of transaction for replacing the packages (basically check if there are not any dependency issues). What's your source?
How can something be disabled that is not there?
The thing is, that we expect something to be here. Then we disable all of them and after that enable the needed ones. So you should see something like (with --debug
):
[2024-06-19T12:55:40+0000] TASK - [Prepare: Subscription Manager - Disable all repositories] *********
[2024-06-19T12:55:40+0000] DEBUG - Calling command 'subscription-manager repos --list-enabled'
[2024-06-19T12:55:55+0000] DEBUG - Repositories enabled in the system prior to the conversion: rhel-7-server-rpms
But the error of "convert2rhel analyze" will be same as on https://github.com/oamg/convert2rhel/issues/1269#issuecomment-2178515403
Yeah, sorry, I was writing the message already, haven't seen this one before sending it. But overall we moved, it's different problem than the first one.
Yes, that's another one. Unfortunately, it is not possible to log in to the administration portal because RH has a "small" problem with the access database. They have been trying to solve the problem for a week now. Therefore I only have the "activation key" and the "company id".
Yes it will be an problem with the activation key. Using another, the repo part will works. But the part "Validate the yum transaction" fails without showing an error:
Running Transaction Check Successfully validated the yum transaction set. VALIDATE_PACKAGE_MANAGER_TRANSACTION has succeeded Writing breadcrumbs to '/etc/migration-results'. Writing RHSM custom facts to '/etc/rhsm/facts/convert2rhel.facts'. WARNING - Abnormal exit! Performing rollback ...
But /etc/rhsm/facts/convert2rhel.facts notes:
{ "conversions.executed": "/bin/convert2rhel analyze", "conversions.target_os": "null", "conversions.env": "null", "conversions.packages.0.nevra": "0:convert2rhel-2.0.0-1.el7.noarch", "conversions.version": "1", "conversions.activity_ended": "2024-06-20T06:33:40.141502Z", "conversions.run_id": "null", "conversions.source_os.name": "CentOS Linux", "conversions.packages.0.signature": "RSA/SHA256, Thu May 30 19:31:23 2024, Key ID 199e2f91fd431d51", "conversions.source_os.version": "7.9", "conversions.activity": "analysis", "conversions.activity_started": "2024-06-20T06:23:33.881678Z", "conversions.success": true, "conversions.source_os.id": "Core" }
I know this can be a bit confusing, but the WARNING - Abnormal exit! Performing rollback ...
is fine in this situation. We have a ticket for this, to change the message to something better. This is the situation, when you are doing analysis and do not want to continue to the conversion - we raise an exception to stop in the right place and this message is part of its handling.
The important thing for you is the [Pre-conversion analysis report]
. It is printed in the end of the log and contains a complete summary - if there are some problems, info, etc. So at the bottom, you should see something like:
[2024-06-19T13:01:07+0000] TASK - [Pre-conversion analysis report] ***********************************
========== Success (No changes needed) ==========
(SUCCESS) CHECK_FIREWALLD_AVAILABILITY::SUCCESS - N/A
(SUCCESS) IS_LOADED_KERNEL_LATEST::SUCCESS - N/A
(SUCCESS) CUSTOM_REPOSITORIES_ARE_VALID::SUCCESS - N/A
(SUCCESS) VALIDATE_PACKAGE_MANAGER_TRANSACTION::SUCCESS - N/A
(SUCCESS) BACKUP_REPOSITORY::SUCCESS - N/A
.
.
.
Yes, under I also see "Success (No changes needed)". And the convert was working.
So you converted your system successfully? Great! I'm happy I was able to help you!
call:
convert2rhel analyze --no-rpm-va --debug
fails with: