RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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.
Bug 1816926 - [7.9 regression] `subscription-manager attach --auto` fails the first time against candlepin server
Summary: [7.9 regression] `subscription-manager attach --auto` fails the first time ag...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.9
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 7.9
Assignee: Jiri Hnidek
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
: 1818769 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-25 07:31 UTC by Martin Pitt
Modified: 2020-09-29 19:23 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 19:23:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 2240 0 None closed 1816926: Fix "attach --auto" command; ENT-2242 2020-11-05 21:15:57 UTC
Red Hat Product Errata RHBA-2020:3866 0 None None None 2020-09-29 19:23:45 UTC

Description Martin Pitt 2020-03-25 07:31:37 UTC
Description of problem: In Cockpit we test interactions with subscriptions against the public candlepin server using the Ansible role [1]. This handles a fake product "88888" instead of the official RHEL one.

In the current RHEL 7.9 nightlies this regressed.

[1] https://github.com/cockpit-project/bots/blob/master/images/scripts/services.setup#L66


Version-Release number of selected component (if applicable):

subscription-manager-1.24.28-1.el7.x86_64

How reproducible: Always


Steps to Reproduce:
1. Boot candlepin server. (If you don't have one at hand yourself, you are welcome to use Cockpit's test VM, I can show you how.)

2. Remove "real" products from test machine, and install the candlepin server's test product:

rm -f /etc/pki/product-default/*.pem /etc/pki/product/*.pem

get ~/candlepin/generated_certs/88888.pem from candlepin machine and copy it to the test machine's /etc/pki/product/

# certificate checks don't work with candlepin server
sed -i -e 's/insecure = 0/insecure = 1/g' /etc/rhsm/rhsm.conf

3. register with

subscription-manager register --insecure --serverurl https://10.111.112.100:8443/candlepin --org=admin --activationkey=awesome_os_pool

This always fails with exit code 1, as no products are attached, and --auto-attach is not supported with --activationkey.

4. attach subscriptions:

subscription-manager attach --auto


Actual results:

# subscription-manager attach --auto
Installed Product Current Status:
Product Name: Shared File System Bits (no content)
Status:       Not Subscribed

Unable to find available subscriptions for all your installed products.

# echo $?
1


Expected results: (Like in 7.8 and before)

# subscription-manager attach --auto
Installed Product Current Status:
Product Name: Shared File System Bits (no content)
Status:       Subscribed

[root@localhost ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Not Specified

# echo $?
0


Additional info:

Comment 7 Jiri Hnidek 2020-04-03 07:43:19 UTC
*** Bug 1818769 has been marked as a duplicate of this bug. ***

Comment 10 Shwetha Kallesh 2020-04-16 06:54:06 UTC
Verification:

[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.9.21-1
subscription management rules: 5.37
subscription-manager: 1.24.32


[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager register --serverurl subscription.rhsm.stage.redhat.com --username stage_auto_syspurpose001 --password redhat
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
The system has been registered with ID: a1661b28-cb71-4470-8393-aadec136a9f5
The registered system name is: hpe-dl380pgen8-02-vm-15.hpe2.lab.eng.bos.redhat.com
[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager attach --auto
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager remove --all
1 local certificate has been deleted.
1 subscription removed at the server.
[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager service-level --show
Service level preference not set
[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager attach --auto --servicelevel=Standard
Service level set to: Standard
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux, Standard Support (128 Sockets, NFR, Partner Only)
Provides:            Red Hat Enterprise Linux High Availability - Update Services for SAP Solutions
                     Red Hat Enterprise Linux Atomic Host
                     Red Hat Enterprise Linux Atomic Host Beta
                     Red Hat Container Images
                     Red Hat Developer Tools (for RHEL Server)
                     Red Hat Container Images Beta
                     Red Hat Developer Tools Beta (for RHEL Server)
                     Red Hat Developer Tools (for RHEL Workstation)
                     Red Hat Developer Tools Beta (for RHEL Workstation)
                     Red Hat Enterprise Linux for Power, little endian
                     Red Hat Enterprise Linux for IBM System z (Structure A)
                     dotNET on RHEL (for RHEL Server)
                     dotNET on RHEL Beta (for RHEL Server)
                     Red Hat Certification (for RHEL Server)
                     Red Hat Enterprise Linux for Real Time
                     Red Hat Directory Server
                     Red Hat Software Collections (for RHEL Server)
                     Red Hat Software Collections (for RHEL Client)
                     RHEL for SAP - Extended Update Support
                     Red Hat Software Collections (for RHEL Workstation)
                     Red Hat Enterprise Linux Server - Extended Life Cycle Support
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Software Collections Beta (for RHEL Client)
                     Red Hat Software Collections Beta (for RHEL Workstation)
                     Red Hat Enterprise Linux Desktop
                     Red Hat Enterprise Linux Server
                     Red Hat Enterprise Linux for Power, little endian - Extended Update Support
                     MRG Realtime
                     Red Hat Enterprise Linux High Performance Networking (for RHEL for IBM POWER)
                     Red Hat Enterprise Linux High Performance Networking (for RHEL for IBM POWER) - Extended Update Support
                     Red Hat Enterprise Linux Scalable File System (for RHEL Compute Node)
                     Red Hat Developer Toolset (for RHEL Server)
                     RHEL for SAP Applications for Power BE
                     Red Hat Enterprise Linux Resilient Storage for IBM z Systems
                     RHEL for SAP Applications for Power BE EUS
                     Red Hat Developer Toolset (for RHEL Workstation)
                     Red Hat Enterprise Linux for SAP Applications for Power, little endian
                     RHEL for SAP Applications for Power LE EUS
                     Red Hat Enterprise Linux for SAP Applications for IBM z Systems
                     Red Hat Certificate System
                     RHEL for SAP Applications for System Z EUS
                     Red Hat Enterprise Linux for SAP HANA for Power, little endian
                     RHEL for SAP HANA for Power LE EUS
                     Red Hat Enterprise Linux for x86_64 - Extended Update Support
                     Red Hat Enterprise Linux Workstation
                     Red Hat Enterprise Linux for IBM z Systems
                     Red Hat Enterprise Linux for IBM z Systems - Extended Update Support
                     Red Hat Enterprise Linux for Power, big endian
                     Red Hat Enterprise Linux for Power, big endian - Extended Update Support
                     Red Hat Enterprise Linux for Scientific Computing
                     Red Hat Beta
                     Red Hat EUCJP Support (for RHEL Server)
                     Red Hat EUCJP Support (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux High Availability (for IBM z Systems) - Extended Update Support
                     Red Hat Enterprise Linux Resilient Storage for IBM z Systems - Extended Update Support
                     Red Hat CodeReady Linux Builder for x86_64 - Extended Update Support
                     Red Hat CodeReady Linux Builder for Power, little endian - Extended Update Support
                     Red Hat Enterprise Linux High Availability for x86_64
                     Red Hat Enterprise Linux High Availability for x86_64 - Extended Update Support
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server)
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update Support
                     Red Hat Developer Toolset (for RHEL Server EUS)
                     Red Hat CodeReady Linux Builder for IBM z Systems - Extended Update Support
                     Red Hat Developer Toolset (for RHEL for IBM POWER)
                     RHEL for SAP for Power, little endian - Extended Update Support
                     RHEL for SAP for IBM z Systems - Extended Update Support
                     RHEL for SAP HANA for Power, little endian - Extended Update Support
                     Red Hat Software Collections (for RHEL Server for ARM)
                     Red Hat Software Collections Beta (for RHEL Server for ARM)
                     Red Hat Hardware Certification Test Suite
                     Red Hat Enterprise Linux Fast Datapath Beta for Power, little endian
                     Red Hat Software Collections (for RHEL Server for IBM Power)
                     Red Hat Software Collections Beta (for RHEL Server for IBM Power)
                     Red Hat Software Collections (for RHEL Server for IBM Power LE)
                     Red Hat Software Collections Beta (for RHEL Server for IBM Power LE)
                     Red Hat Enterprise Linux for x86_64
                     Red Hat Software Collections (for RHEL Server for System Z)
                     Red Hat Enterprise Linux Resilient Storage for x86_64
                     Red Hat Software Collections Beta (for RHEL Server for System Z)
                     Red Hat Enterprise Linux Resilient Storage for x86_64 - Extended Update Support
                     Red Hat Enterprise Linux Scalable File System (for RHEL Server)
                     Red Hat Enterprise Linux Scalable File System (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Scalable File System (for RHEL Workstation)
                     Oracle Java (for RHEL Server)
                     Red Hat Enterprise Linux for SAP HANA for x86_64
                     Oracle Java (for RHEL Client)
                     Oracle Java (for RHEL Compute Node)
                     Oracle Java (for RHEL Workstation)
                     Oracle Java (for RHEL Compute Node) - Extended Update Support
                     Oracle Java (for RHEL Server) - Extended Update Support
                     Red Hat Developer Tools (for RHEL Server for ARM)
                     Red Hat S-JIS Support (for RHEL Server)
                     Red Hat Developer Tools Beta (for RHEL Server for ARM)
                     RHEL for SAP HANA - Extended Update Support
                     Red Hat S-JIS Support (for RHEL Server) - Extended Update Support
                     Red Hat Developer Tools (for RHEL Server for IBM Power)
                     Red Hat Software Test Suite 5 (for RHEL Server)
                     Red Hat Developer Tools Beta (for RHEL Server for IBM Power)
                     Red Hat Developer Tools (for RHEL Server for IBM Power LE)
                     Red Hat Developer Tools Beta (for RHEL Server for IBM Power LE)
                     Red Hat Developer Tools (for RHEL Server for System Z)
                     Red Hat Developer Tools Beta (for RHEL Server for System Z)
                     Red Hat Ansible Engine
                     Red Hat CodeReady Linux Builder for x86_64
                     Red Hat CodeReady Linux Builder for Power, little endian
                     Red Hat Enterprise Linux Server - Extended Life Cycle Support (for IBM z Systems)
                     Red Hat CodeReady Linux Builder for IBM z Systems
                     Red Hat Enterprise Linux High Performance Networking (for RHEL Server)
                     Red Hat Enterprise Linux High Performance Networking (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Resilient Storage for Power, little endian
                     Red Hat Enterprise Linux High Performance Networking (for RHEL Compute Node)
                     Red Hat Enterprise Linux Resilient Storage for IBM Power LE - Extended Update Support
                     Oracle Java (for RHEL Server) - AUS
                     Red Hat Enterprise Linux High Availability for Power, little endian
                     Red Hat Enterprise Linux High Availability (for IBM Power LE) - Extended Update Support
                     Red Hat Enterprise Linux Server (for IBM Power LE) - Update Services for SAP Solutions
                     RHEL for SAP (for IBM Power LE) - Update Services for SAP Solutions
                     RHEL for SAP HANA (for IBM Power LE) - Update Services for SAP Solutions
                     Red Hat Enterprise Linux High Availability (for IBM Power LE) - Update Services for SAP Solutions
                     Red Hat Enterprise Linux Server - Update Services for SAP Solutions
                     Red Hat Enterprise Linux for Power 9
                     Red Hat Enterprise Linux for SAP Applications for x86_64
                     Red Hat Enterprise Linux High Availability for IBM z Systems
                     RHEL for SAP - Update Services for SAP Solutions
                     RHEL for SAP HANA - Update Services for SAP Solutions
SKU:                 RH3310120
Contract:            12034259
Account:             6320620
Serial:              7518064237769984698
Pool ID:             8a99f9ae6e3a9cac016e3b67523c0075
Provides Management: No
Active:              True
Quantity Used:       1
Service Type:        L1-L3
Roles:               
Service Level:       Standard
Usage:               
Add-ons:             
Status Details:      Subscription is current
Subscription Type:   Standard
Starts:              11/05/2019
Ends:                11/04/2020
Entitlement Type:    Virtual


[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager attach --auto --servicelevel=Premium
Service level set to: Premium
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager service-level --show
Current service level: Premium
[root@hpe-dl380pgen8-02-vm-15 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux Server, Premium (Physical or Virtual Nodes)
Provides:            Red Hat CodeReady Linux Builder for x86_64
                     Red Hat Enterprise Linux Atomic Host
                     Red Hat Enterprise Linux Atomic Host Beta
                     Red Hat Developer Tools (for RHEL Server)
                     Red Hat Container Images
                     Red Hat Developer Tools Beta (for RHEL Server)
                     Red Hat Container Images Beta
                     Red Hat Developer Toolset (for RHEL Server)
                     Red Hat Enterprise Linux High Performance Networking (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux for x86_64
                     Red Hat Enterprise Linux Resilient Storage for x86_64 - Extended Update Support
                     Red Hat Enterprise Linux for x86_64 - Extended Update Support
                     dotNET on RHEL (for RHEL Server)
                     Red Hat Enterprise Linux Scalable File System (for RHEL Server) - Extended Update Support
                     dotNET on RHEL Beta (for RHEL Server)
                     Red Hat Beta
                     Red Hat EUCJP Support (for RHEL Server) - Extended Update Support
                     Oracle Java (for RHEL Server)
                     Red Hat Software Collections (for RHEL Server)
                     Oracle Java (for RHEL Server) - Extended Update Support
                     Red Hat CodeReady Linux Builder for x86_64 - Extended Update Support
                     Red Hat S-JIS Support (for RHEL Server) - Extended Update Support
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Ansible Engine
                     Red Hat Enterprise Linux High Availability for x86_64 - Extended Update Support
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Server
SKU:                 RH00003
Contract:            12034260
Account:             6320620
Serial:              4640746441436126287
Pool ID:             8a99f9ae6e3a9cac016e3b65588b004d
Provides Management: No
Active:              True
Quantity Used:       1
Service Type:        L1-L3
Roles:               Red Hat Enterprise Linux Server
Service Level:       Premium
Usage:               Production
Add-ons:             
Status Details:      Subscription is current
Subscription Type:   Instance Based
Starts:              11/05/2019
Ends:                11/04/2020
Entitlement Type:    Physical

Comment 12 errata-xmlrpc 2020-09-29 19:23:08 UTC
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 (subscription-manager bug fix update), 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/RHBA-2020:3866


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