Bug 2178610 - Entitlement certificate related errors logged in /var/log/rhsm/rhsm.log when simple content access enabled.
Summary: Entitlement certificate related errors logged in /var/log/rhsm/rhsm.log when ...
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: subscription-manager
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 9.3
Assignee: Pino Toscano
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks: 1982670 2221711
TreeView+ depends on / blocked
 
Reported: 2023-03-15 12:17 UTC by Pino Toscano
Modified: 2023-07-10 15:49 UTC (History)
13 users (show)

Fixed In Version: subscription-manager-1.29.34-1.el9
Doc Type: No Doc Update
Doc Text:
Clone Of: 1982670
: 2221711 (view as bug list)
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 3226 0 None Merged 2178610: do not collect unentitled products in SCA mode 2023-03-24 07:37:34 UTC
Github candlepin subscription-manager pull 3229 0 None Merged test: add simple test for 2178610 2023-03-24 07:37:32 UTC
Red Hat Issue Tracker RHELPLAN-151925 0 None None None 2023-03-15 12:18:06 UTC

Description Pino Toscano 2023-03-15 12:17:28 UTC
+++ This bug was initially created as a clone of Bug #1982670 +++

Description of problem:

System is registered to Satellite successfully using SCA but some entitlement certificate related messages/errors are keep getting generated in /var/log/rhsm/rhsm.log. 

Steps to Reproduce:

[root@rhel8client ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.3 (Ootpa)

[root@rhel8client ~]# rpm -qa | grep subscription-manager
subscription-manager-1.28.13-3.el8_4.x86_64
subscription-manager-rhsm-certificates-1.28.13-3.el8_4.x86_64
dnf-plugin-subscription-manager-1.28.13-3.el8_4.x86_64
subscription-manager-cockpit-1.28.13-3.el8_4.noarch
python3-subscription-manager-rhsm-1.28.13-3.el8_4.x86_64

[root@rhel8client ~]# syspurpose show
{}

[root@rhel8client ~]# syspurpose set-role "Red Hat Enterprise Linux Workstation"
role set to "Red Hat Enterprise Linux Workstation".
[root@rhel8client ~]# syspurpose show
{
  "role": "Red Hat Enterprise Linux Workstation"
}

[root@rhel8client ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Disabled
Content Access Mode is set to Simple Content Access. This host has access to content, regardless of subscription status.

System Purpose Status: Disabled

[root@rhel8client ~]# ls /etc/pki/product-default/
479.pem

[root@rhel8client ~]# yum update -y

[root@rhel8client ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.4 (Ootpa)

[root@rhel8client ~]# syspurpose show
{
  "role": "Red Hat Enterprise Linux Workstation"

[root@rhel8client ~]# ls /etc/pki/product
product/         product-default/ 

[root@rhel8client ~]# ls /etc/pki/product-default/
479.pem

/var/log/rhsm/rhsm.log

Total updates: 1
Found (local) serial# []
Expected (UEP) serial# [5615889862954254283]
Added (new)
  [sn:5615889862954254283 ( Content Access,) @ /etc/pki/entitlement/5615889862954254283.pem]
Deleted (rogue):
  <NONE>
2021-07-11 09:26:31,973 [WARNING] subscription-manager:5798:MainThread @cert_sorter.py:194 - Installed product 479 not present in response from server.
2021-07-11 09:26:50,363 [INFO] yum:5803:MainThread @entcertlib.py:131 - certs updated:
Total updates: 1
Found (local) serial# []
Expected (UEP) serial# [5615889862954254283]
Added (new)
  [sn:5615889862954254283 ( Content Access,) @ /etc/pki/entitlement/5615889862954254283.pem]
Deleted (rogue):

Actual results:

Above error generated in /var/log/rhsm/rhsm.log

Expected results:

Need to avoid unwanted messages from the logs.

Comment 1 Jan Stavel 2023-03-27 19:59:57 UTC
I have installed a product certificate 479.pem into /etc/pki/product-default.
A warning about certificate appeared in the log file.

2023-03-27 08:46:09,536 [WARNING] subscription-manager:22559:MainThread @cert_sorter.py:194 - Installed product 479 not present in response from server.

[root@sgi-uv30-01 ~]# subscription-manager syspurpose role --set "Red Hat Enterprise Linux Workstation"
Warning: Provided value "Red Hat Enterprise Linux Workstation" is not included in the list of valid values
 - Red Hat Enterprise Linux Server
role set to "Red Hat Enterprise Linux Workstation".
[root@sgi-uv30-01 ~]# 

root@sgi-uv30-01 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Disabled
Content Access Mode is set to Simple Content Access. This host has access to content, regardless of subscription status.

System Purpose Status: Disabled



After I updated package subscription-manager to the latest version provided by a jenkins build job no warning appeared.

Comment 5 Zdenek Petracek 2023-04-18 12:54:19 UTC
Final verification done on sub-man version:
[root@kvm-01-guest09 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 4.2.15-1
subscription management rules: 5.43
subscription-manager: 1.29.34-1.el9

[root@kvm-01-guest09 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 9.3 Beta (Plow)

[root@kvm-01-guest09 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Disabled
Content Access Mode is set to Simple Content Access. This host has access to content, regardless of subscription status.

System Purpose Status: Disabled



Updating the certificate:
[root@kvm-01-guest09 product-default]# ls /etc/pki/product-default/
479.pem

cat /var/log/rhsm/rhsm.log:
2023-04-18 12:54:04,000 [INFO] subscription-manager:16517:MainThread @managerlib.py:103 - Consumer created: kvm-01-guest09.lab.eng.brq2.redhat.com (414ccbfc-bc31-4bbe-a79c-94a8ab2003e8)
2023-04-18 12:54:06,834 [INFO] subscription-manager:16517:MainThread @entcertlib.py:107 - certs updated:
Total updates: 1
Found (local) serial# []
Expected (UEP) serial# [7365450278341807506]
Added (new)
  [sn:7365450278341807506 ( Content Access,) @ /etc/pki/entitlement/7365450278341807506.pem]
Deleted (rogue):
  <NONE>

^^ There was no "[WARNING] subscription-manager:5798:MainThread @cert_sorter.py:194 - Installed product 479 not present in response from server." error -> PASSED


Note You need to log in before you can comment on or make changes to this bug.