-
Sub-task
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
False
-
False
-
-
1
-
Testable
The parent issue RHELC-1728 has the label that triggered autocreation of this subtask to track the relative story point estimation for the integration test part of the issue.
The parent issue description at the time of creation of this issue was:
When there is an ERROR raised early during either analysis or convert, we try to collect the RHSM fact, disregarding if the subscription manager is already installed or even subscribed.
CRITICAL - Couldn't download the centos-gpg-keys-9.0-26.el9.noarch package which is needed to do a rollback of this action. Check to make sure that the CentOS Stream repositories are enabled and the package is updated to its latest version. Note that you can choose to disregard this check when running a conversion by setting the environment variable 'CONVERT2RHEL_INCOMPLETE_ROLLBACK=1' but not during a pre-conversion analysis. ERROR - (ERROR) REMOVE_SPECIAL_PACKAGES::SPECIAL_PACKAGE_REMOVAL_FAILED - Failed to remove some packages necessary for the conversion. Description: The cause of this error is unknown, please look at the diagnosis for more information. Diagnosis: Couldn't download the centos-gpg-keys-9.0-26.el9.noarch package which is needed to do a rollback of this action. Check to make sure that the CentOS Stream repositories are enabled and the package is updated to its latest version. Note that you can choose to disregard this check when running a conversion by setting the environment variable 'CONVERT2RHEL_INCOMPLETE_ROLLBACK=1' but not during a pre-conversion analysis. Remediations: N/A ERROR - Skipped PRE_SUBSCRIPTION. Skipped because REMOVE_SPECIAL_PACKAGES was not successful ERROR - Skipped SUBSCRIBE_SYSTEM. Skipped because PRE_SUBSCRIPTION was not successful 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'. Updating RHSM custom facts collected during the conversion. [2024-09-03T09:43:04+0000] DEBUG - Calling command 'subscription-manager facts --update' WARNING - Failed to update the RHSM custom facts with return code '1' and output 'This system is not yet registered. Try 'subscription-manager register --help' for more information. '. WARNING - Abnormal exit! Performing rollback ...
On systems, where the subscription-manager is not installed already, there is even a traceback raised preventing the whole analysis to finish and report correctly.
CRITICAL - Couldn't download the rocky-gpg-keys-9.4-1.7.el9.noarch package which is needed to do a rollback of this action. Check to make sure that the Rocky Linux repositories are enabled and the package is updated to its latest version. Note that you can choose to disregard this check when running a conversion by setting the environment variable 'CONVERT2RHEL_INCOMPLETE_ROLLBACK=1' but not during a pre-conversion analysis. ERROR - (ERROR) REMOVE_SPECIAL_PACKAGES::SPECIAL_PACKAGE_REMOVAL_FAILED - Failed to remove some packages necessary for the conversion. Description: The cause of this error is unknown, please look at the diagnosis for more information. Diagnosis: Couldn't download the rocky-gpg-keys-9.4-1.7.el9.noarch package which is needed to do a rollback of this action. Check to make sure that the Rocky Linux repositories are enabled and the package is updated to its latest version. Note that you can choose to disregard this check when running a conversion by setting the environment variable 'CONVERT2RHEL_INCOMPLETE_ROLLBACK=1' but not during a pre-conversion analysis. Remediations: N/A ERROR - Skipped PRE_SUBSCRIPTION. Skipped because REMOVE_SPECIAL_PACKAGES was not successful ERROR - Skipped SUBSCRIBE_SYSTEM. Skipped because PRE_SUBSCRIPTION was not successful 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'. Updating RHSM custom facts collected during the conversion. [2024-09-09T13:24:51+0000] DEBUG - Calling command 'subscription-manager facts --update' [2024-09-09T13:24:51+0000] DEBUG - /var/run/lock/convert2rhel.pid PID 8790 unlocked. Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/convert2rhel/main.py", line 153, in main_locked raise _AnalyzeExit() convert2rhel.main._AnalyzeExit During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/convert2rhel", line 33, in <module> sys.exit(load_entry_point('convert2rhel==2.1.0', 'console_scripts', 'convert2rhel')()) File "/usr/lib/python3.9/site-packages/convert2rhel/initialize.py", line 98, in run return main.main() File "/usr/lib/python3.9/site-packages/convert2rhel/main.py", line 120, in main return main_locked() File "/usr/lib/python3.9/site-packages/convert2rhel/main.py", line 193, in main_locked subscription.update_rhsm_custom_facts() File "/usr/lib/python3.9/site-packages/convert2rhel/subscription.py", line 897, in update_rhsm_custom_facts output, ret_code = utils.run_subprocess(cmd, print_output=False) File "/usr/lib/python3.9/site-packages/convert2rhel/utils/__init__.py", line 348, in run_subprocess process = subprocess.Popen( # pylint: disable=consider-using-with File "/usr/lib64/python3.9/subprocess.py", line 951, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib64/python3.9/subprocess.py", line 1837, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'subscription-manager'
Acceptance criteria:
- handle the `No such file or directory: 'subscription-manager'` traceback
- alternativelly call the update of the RHSM fact only after the system is registered.