Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionRafael Cavalcanti
2021-08-18 17:55:26 UTC
Description of problem:
Trying to register a host(already register to another Satellite) by going to Hosts -> Register Host and check the 'force' option in 'Advanced' tab is failing as the katello-ca-consumer installed is not being removed.
Version-Release number of selected component (if applicable):
How reproducible:
100%
Steps to Reproduce:
1. Satellite webUI -> Hosts -> Register Host
2. Fill the fields and in the 'Advanced' tab check the 'Force' options
3. Register the host with the registration command generated
Actual results:
The registration command does not remove the katello-ca-consumer packages.
The 'Force' option is supposed to:
---
"Remove any `katello-ca-consumer` rpms before registration and run subscription-manager with `--force` argument."
--
The script seems to look for this 'katello-ca-consumer-latest.noarch.rpm' and can't find a package with this name installed.
Expected results:
Remove the katello-ca-consumer and install a new one. Otherwise, the transaction will conflict:
---
Transaction check error:
file /usr/bin/katello-rhsm-consumer from install of katello-ca-consumer-rguerra-sat610.rguerra.lab-1.0-1.noarch conflicts with file from package katello-ca-consumer-rguerra-cap610.rguerra.lab-1.0-1.noarch
Error Summary
---
Additional info:
From my LAB:
---
1. Register the system to a satellite server:
[root@rhel7-02 ~]# subscription-manager register --org="ACME" --activationkey="ak-rhel7-library" --force
The system has been registered with ID: 2d9c0316-717d-4422-91b0-c2761c87b84a
The registered system name is: rhel7-02.rguerra.lab
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status: Subscribed
[root@rhel7-02 ~]# rpm -qa |grep katello-ca
katello-ca-consumer-janga.rguerra.lab-1.0-9.noarch
2. Run the script generated on another Satellite:
[root@rhel7-02 ~]# curl -sS --insecure 'https://rguerra-sat610.rguerra.lab:9090/register?activation_keys=ak-rhel7&force=true&lifecycle_environment_id=2&location_id=2&operatingsystem_id=1&organization_id=1&update_packages=false' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjo0LCJpYXQiOjE2MjkzMDY2ODMsImp0aSI6ImFjMTdhNmNkMTI4MmFkY2RiYzExNzkxMTVlNDEyMmI3ZDI0MTNjY2VlYmU4MDM3YjFjZjBjYmNhYTFmOTM2NDQiLCJleHAiOjE2MjkzMjEwODMsInNjb3BlIjoicmVnaXN0cmF0aW9uI2dsb2JhbCByZWdpc3RyYXRpb24jaG9zdCJ9.goxamrSaQs63-Jjd4HwofckTk9eAIR2dza2YTjE3fiM' | bash
#
# Running registration
#
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager
No Match for argument: katello-ca-consumer-latest.noarch.rpm
No Match for argument: katello-ca-consumer-latest.noarch.rpm.1
No Match for argument: katello-ca-consumer-latest.noarch.rpm.2
No Match for argument: katello-ca-consumer-latest.noarch.rpm.3
No Match for argument: katello-ca-consumer-latest.noarch.rpm.4
No Packages marked for removal
Uploading Enabled Repositories Report
WARNING:dnf:Failed to synchronize cache for repo 'rhel-7-server-satellite-tools-6.7-rpms', ignoring this repo.
WARNING:dnf:Failed to synchronize cache for repo 'rhel-7-server-rpms', ignoring this repo.
WARNING:dnf:Failed to synchronize cache for repo 'rhel-7-server-ansible-2.9-rpms', ignoring this repo.
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager
Examining /tmp/tmp.NtMfIcwnfG.rpm: katello-ca-consumer-rguerra-sat610.rguerra.lab-1.0-1.noarch
Marking /tmp/tmp.NtMfIcwnfG.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package katello-ca-consumer-rguerra-sat610.rguerra.lab.noarch 0:1.0-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================================================
Installing:
katello-ca-consumer-rguerra-sat610.rguerra.lab noarch 1.0-1 /tmp.NtMfIcwnfG 20 k
Transaction Summary
=============================================================================================================================================================================================
Install 1 Package
Total size: 20 k
Installed size: 20 k
Downloading packages:
Running transaction check
Running transaction test
Transaction check error:
file /usr/bin/katello-rhsm-consumer from install of katello-ca-consumer-rguerra-sat610.rguerra.lab-1.0-1.noarch conflicts with file from package katello-ca-consumer-janga.rguerra.lab-1.0-9.noarch
Error Summary
-------------
Uploading Enabled Repositories Report
WARNING:dnf:Failed to synchronize cache for repo 'rhel-7-server-satellite-tools-6.7-rpms', ignoring this repo.
WARNING:dnf:Failed to synchronize cache for repo 'rhel-7-server-rpms', ignoring this repo.
WARNING:dnf:Failed to synchronize cache for repo 'rhel-7-server-ansible-2.9-rpms', ignoring this repo.
Unregistering from: janga.rguerra.lab:8443/rhsm
The system with UUID 2d9c0316-717d-4422-91b0-c2761c87b84a has been unregistered
All local data removed
HTTP error (404 - Not Found): Couldn't find activation key 'ak-rhel7' <<<<< This is due to the katello-ca-consumer installed at the first registration.
3. Check the registration and package installed:
---
[root@rhel7-02 ~]# subscription-manager identity ; rpm -qa |grep katello-ca-consumer
This system is not yet registered. Try 'subscription-manager register --help' for more information.
katello-ca-consumer-janga.rguerra.lab-1.0-9.noarch
---
Hello
see also:
Bug 1993742 - Force option in registration template does not remove an existing katello-ca-consumer as mentioned in the info message beside
Hello
consumer cert is now removed but registration fails later due to:
Unable to verify server's identity: [SSL: TLSV1_ALERT_UNKNOWN_CA] tlsv1 alert unknown ca (_ssl.c:897)
Will be fixed in:
Bug 2006827 - Run 'subscription-manager clean' when force=true
thank you
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2021:4702