Project

General

Profile

Actions

Bug #36674

closed

Can not re-register with --force after deleting consumer certs against satellite614

Added by Jeremy Lenz over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Hosts
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2225406

Description of problem:
Can not re-register with --force after deleting consumer certs against satellite614

Version-Release number of selected component (if applicable):
katello-4.9.0-1.el8sat.noarch
candlepin-4.3.1-1.el8sat.noarch

How reproducible:
always

Steps to Reproduce:
1. Register RHEL-8.9.0-20230718.23 against satellite6.14 snap 8.0:

[root@koza-3 ~]# subscription-manager register --username=admin --password=admin --org=sca_org --environment=Library
Registering to: dell-per740-68-vm-07.lab.eng.pek2.redhat.com:443/rhsm
The system has been registered with ID: e6798835-4cf6-4472-a0f9-c4848bc6e5d8
The registered system name is: koza-3.4a2m.lab.eng.bos.redhat.com

[root@koza-3 ~]# ls /etc/pki/entitlement/
5262642170835786293-key.pem 5262642170835786293.pem

[root@koza-3 ~]# ls /etc/pki/consumer/
cert.pem key.pem

2. Remove the consumer certs, and re-register with --force:

[root@koza-3 ~]# rm -rf /etc/pki/consumer/*

[root@koza-3 ~]# ls /etc/pki/consumer/

[root@koza-3 ~]# subscription-manager register --force --username=admin --password=admin --org=sca_org --environment=Library
Registering to: dell-per740-68-vm-07.lab.eng.pek2.redhat.com:443/rhsm
Unit e6798835-4cf6-4472-a0f9-c4848bc6e5d8 has been deleted (HTTP error code 410: Gone)

3. Check the rhsm.log:
2023-07-25 05:03:55,584 [INFO] subscription-manager:76316:MainThread managerlib.py:72 - Consumer created: koza-3.4a2m.lab.eng.bos.redhat.com (e6798835-4cf6-4472-a0f9-c4848bc6e5d8)
2023-07-25 05:04:01,131 [INFO] subscription-manager:76316:MainThread @entcertlib.py:132 - certs updated:
Total updates: 1
Found (local) serial# []
Expected (UEP) serial# [5262642170835786293]
Added (new)
[sn:5262642170835786293 ( Content Access,)
/etc/pki/entitlement/5262642170835786293.pem]
Deleted (rogue):
<NONE>
2023-07-25 05:05:33,424 [ERROR] subscription-manager:76549:MainThread @managercli.py:2043 - HTTP error (410 - Gone): Unit e6798835-4cf6-4472-a0f9-c4848bc6e5d8 has been deleted
Traceback (most recent call last):
File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 2040, in _do_command
service_level=self.options.service_level,
File "/usr/lib64/python3.6/site-packages/rhsmlib/services/register.py", line 111, in register
jwt_token=jwt_token
File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 1211, in registerConsumer
return self.conn.request_post(url, params, headers=headers)
File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 992, in request_post
return self._request("POST", method, params, headers=headers)
File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 1022, in _request
info=info, headers=headers, cert_key_pairs=cert_key_pairs)
File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 870, in _request
self.validateResponse(result, request_type, handler)
File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 914, in validateResponse
parsed['deletedId'])
rhsm.connection.GoneException: HTTP error (410 - Gone): Unit e6798835-4cf6-4472-a0f9-c4848bc6e5d8 has been deleted
[root@koza-3 ~]#

Actual results:
As step 2, re-register failed.

Expected results:
Re-register should succeed.

Additional info:
It is successful to re-register rhel against satellite6.13:

(1)
katello-4.7.0-1.el8sat.noarch
candlepin-4.2.15-1.el8sat.noarch

(2)
[root@sweetpig-21 ~]# subscription-manager register --username=admin --password=admin --org=sca_org --environment=Library
Registering to: dell-per740-68-vm-05.lab.eng.pek2.redhat.com:443/rhsm
The system has been registered with ID: 8aa64c47-a8ad-494a-8d7a-4301f0f1bde5
The registered system name is: sweetpig-21.4a2m.lab.eng.bos.redhat.com

[root@sweetpig-21 ~]# ls /etc/pki/consumer/
cert.pem key.pem
[root@sweetpig-21 ~]# rm -rf /etc/pki/consumer/*

[root@sweetpig-21 ~]# subscription-manager register --force --username=admin --password=admin --org=sca_org --environment=Library

Registering to: dell-per740-68-vm-05.lab.eng.pek2.redhat.com:443/rhsm
The system has been registered with ID: 23d75fed-3cf1-4432-bc45-ed4a08339f6b
The registered system name is: sweetpig-21.4a2m.lab.eng.bos.redhat.com
1 local certificate has been deleted.

[root@sweetpig-21 ~]# subscription-manager identity
system identity: 23d75fed-3cf1-4432-bc45-ed4a08339f6b
name: sweetpig-21.4a2m.lab.eng.bos.redhat.com
org name: sca_org
org ID: sca_org
environment name: Library

Actions #1

Updated by The Foreman Bot over 1 year ago

  • Status changed from New to Ready For Testing
  • Assignee set to Jeremy Lenz
  • Pull request https://github.com/Katello/katello/pull/10694 added
Actions #2

Updated by The Foreman Bot over 1 year ago

  • Fixed in Releases Katello 4.10.0 added
Actions #3

Updated by Jeremy Lenz over 1 year ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by Jeremy Lenz over 1 year ago

  • Subject changed from Can not re-register with --force after deleting consumer certs against satellite614 to Can not re-register with --force after deleting consumer certs against satellite614
  • Target version set to Katello 4.10.0
  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF