Project

General

Profile

Actions

Bug #37966

closed

Katello tries to update the deleted Candlepin consumer during force register after deleting certificates

Added by Jeremy Lenz about 2 months ago. Updated about 2 months ago.

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

Description

Description of problem:

can not re-register rhel on RHEL-10.0-20240908.1 and RHEL-9.5.0-20240908.2

How reproducible:

always

Is this issue a regression from an earlier version:

YES

Steps to Reproduce:

Register rhel system :
[root@sweetpig-17 ~]# subscription-manager register --username=admin --password=xxx --org=sca_org --environment=Library

Registering to: katello:443/rhsm

The system has been registered with ID: d50627a5-e110-44af-81db-e3022dbd4b37

The registered system name is: hostname

2. Re-register with "subscription-manager --force":

[root@anurag hostname ~]# rm -rf /etc/pki/consumer/*

[root@hostname ~]# echo '' > /var/log/rhsm/rhsm.log

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

Registering to: katello:443/rhsm

Unit d50627a5-e110-44af-81db-e3022dbd4b37 has been deleted (HTTP error code 410: Gone)

3. Check the rhsm.log:

[root@hostname ~]# cat /var/log/rhsm/rhsm.log

2024-09-10 02:57:22,648 [WARNING] subscription-manager:150073:MainThread @connection.py:1207 - Local system clock seems to be off by 3:08:59, please check your system time.

2024-09-10 02:57:23,703 [WARNING] subscription-manager:150073:MainThread @connection.py:1207 - Local system clock seems to be off by 3:08:59, please check your system time.

2024-09-10 02:57:24,907 [WARNING] subscription-manager:150073:MainThread @connection.py:1207 - Local system clock seems to be off by 3:08:59, please check your system time.

2024-09-10 02:57:25,446 [WARNING] subscription-manager:150073:MainThread @connection.py:1207 - Local system clock seems to be off by 3:08:59, please check your system time.

2024-09-10 02:57:26,349 [WARNING] subscription-manager:150073:MainThread @connection.py:1207 - Local system clock seems to be off by 3:09:00, please check your system time.

2024-09-10 02:57:26,349 [ERROR] subscription-manager:150073:MainThread @register.py:365 - HTTP error (410 - Gone): Unit d50627a5-e110-44af-81db-e3022dbd4b37 has been deleted

Traceback (most recent call last):

File "/usr/lib64/python3.9/site-packages/subscription_manager/cli_command/register.py", line 355, in _do_command
consumer = service.register(
File "/usr/lib64/python3.9/site-packages/rhsmlib/services/register.py", line 115, in register
consumer = self.cp.registerConsumer(
File "/usr/lib64/python3.9/site-packages/rhsm/connection.py", line 1598, in registerConsumer
return self.conn.request_post(url, params, headers=headers, description=_("Registering system"))
File "/usr/lib64/python3.9/site-packages/rhsm/connection.py", line 1373, in request_post
result: Dict[str, Any] = self._request(
File "/usr/lib64/python3.9/site-packages/rhsm/connection.py", line 1218, in _request
self.validateResult(result, request_type, handler)
File "/usr/lib64/python3.9/site-packages/rhsm/connection.py", line 1269, in validateResult
raise GoneException(result["status"], parsed["displayMessage"], parsed["deletedId"])

rhsm.connection.GoneException: HTTP error (410 - Gone): Unit d50627a5-e110-44af-81db-e3022dbd4b37 has been deleted

2024-09-10 02:58:11,102 [ERROR] rhsmcertd-worker:150165:MainThread @rhsmcertd_worker.py:320 - Either the consumer is not registered or the certificates are corrupted. Certificate update using daemon failed.

Actual behavior:
After deleting the /etc/pki/consumer/*, failed to re-register with 'subscription-manager register --force'.

Expected behavior:
The re-registration should be successful

rubygem-hammer_cli_katello-1.14.2-1.el9sat.noarch

candlepin-4.4.14-1.el9sat.noarch

katello-4.14.0-0.1.rc2.el9sat.noarch

(2)This bug happens with both RHEL-10.0-20240908.1 and RHEL-9.5.0-20240908.2:

subscription-manager-1.30.1-1.el10.x86_64

subscription-manager-1.29.42-1.el9.x86_64

Actions

Also available in: Atom PDF