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 1335371 - Despite an "Insufficient" subscription status, the GUI is blocked from auto-subscribing by "No need to update subscriptions" message.
Summary: Despite an "Insufficient" subscription status, the GUI is blocked from auto-s...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: pre-dev-freeze
: ---
Assignee: William Poteat
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-12 05:56 UTC by qianzhan
Modified: 2016-11-03 20:28 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 20:28:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
notice_when_trying_to_auto-attach_with_an_already_attached_system_in_GUI.png (121.82 KB, image/png)
2016-05-16 03:35 UTC, qianzhan
no flags Details
When_status_insufficient_gui_shows_no_need_autoattach.png (213.43 KB, image/png)
2016-06-03 07:25 UTC, qianzhan
no flags Details
register_and_auto-attach.png (153.76 KB, image/png)
2016-07-14 03:00 UTC, qianzhan
no flags Details
auto-attach_in_GUI_when_Insufficient_subscription_status.png (151.76 KB, image/png)
2016-07-14 03:01 UTC, qianzhan
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2592 0 normal SHIPPED_LIVE Moderate: subscription-manager security, bug fix, and enhancement update 2016-11-03 12:10:42 UTC

Description qianzhan 2016-05-12 05:56:01 UTC
Description of problem:
There is no notice when auto-attach again on a already auto-attached system

Version-Release number of selected component (if applicable):
Satellite-6.2.0-RHEL-6-20160506.0

How reproducible:
always

Steps to Reproduce:
1. Register rhel6.8 against Satellite-6.2.0-RHEL-6-20160506.0.
[root@dhcp-128-71 ~]# subscription-manager register
Registering to: satellite6.redhat.com:443/rhsm
Username: admin
Password: 
The system has been registered with ID: 46b1eb43-9b64-4714-8e7e-0e83546913d1 

2. Auto attach the system:
[root@dhcp-128-71 ~]# subscription-manager attach


Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

3. Auto attach again after step 2:
[root@dhcp-128-71 ~]# subscription-manager attach


Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@dhcp-128-71 ~]# subscription-manager attach


Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

4. Check the consumed subscription:
[root@dhcp-128-71 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name:   Red Hat Enterprise Linux Server for PRIMEQUEST, Premium (2
                     sockets) (L3 Only)
Provides:            Red Hat Enterprise Linux High Performance Networking (for
                     RHEL Server) - Extended Update Support
                     Red Hat Enterprise Linux Server - Extended Update Support
                     Red Hat Enterprise Linux Server
                     Red Hat Enterprise Linux Atomic Host
                     Red Hat EUCJP Support (for RHEL Server) - Extended Update
                     Support
                     Red Hat Enterprise Linux Resilient Storage (for RHEL
                     Server) - Extended Update Support
                     Red Hat Beta
                     Red Hat Software Collections (for RHEL Server)
                     Red Hat Enterprise Linux High Availability (for RHEL
                     Server) - Extended Update Support
                     Red Hat Enterprise Linux Atomic Host Beta
                     Red Hat Developer Toolset (for RHEL Server)
                     Red Hat Enterprise Linux Scalable File System (for RHEL
                     Server) - Extended Update Support
                     Red Hat Software Collections Beta (for RHEL Server)
                     Red Hat Enterprise Linux Load Balancer (for RHEL Server) -
                     Extended Update Support
                     Red Hat Container Images
                     Red Hat Container Images Beta
                     Red Hat S-JIS Support (for RHEL Server) - Extended Update
                     Support
SKU:                 RH00204
Contract:            10752431
Account:             5584289
Serial:              1224066339873681472
Pool ID:             8ac9835e549e5fbe01549e70feba02a2
Provides Management: No
Active:              True
Quantity Used:       1
Service Level:       Premium
Service Type:        L3
Status Details:      Guest has not been reported on any host and is using a
                     temporary unmapped guest subscription.
Subscription Type:   Standard (Temporary)
Starts:              02/29/2016
Ends:                05/13/2016
System Type:         Virtual

[root@dhcp-128-71 ~]# 




Actual results:
As step 3.

Expected results:
There should be a notice to inform the system is auto-attached already. No need to auto attach again.

Additional info:

Comment 1 Barnaby Court 2016-05-13 17:25:11 UTC
The auto-attach updates the facts from the systems. We do not know until it has been processed that no new entitlements were added. An auto-attach was performed each time as requested from the command line. 

Is the request that if auto-attach is run, and no new entitlements were added, subscription-manager should print a message indicating that no new entitlements were added?

Comment 2 qianzhan 2016-05-16 03:34:57 UTC
Hi Barnaby

The attachment, 'notice_when_trying_to_auto-attach_with_an_already_attached_system_in_GUI.png', is the reasonable behavior in GUI. If the installed products are covered by valid entitlements, there is no need to attaching any subscriptions.  And the logic should keep consistency with CLI and GUI.

Comment 3 qianzhan 2016-05-16 03:35:30 UTC
Created attachment 1157788 [details]
notice_when_trying_to_auto-attach_with_an_already_attached_system_in_GUI.png

Comment 4 Barnaby Court 2016-05-23 15:23:06 UTC
Moving to sub-man as that is where this bug will be fixed.

Comment 6 John Sefler 2016-06-02 17:12:43 UTC
This is not a bug because....

1. The functionality in comment 1 and comment 2 was already implemented by bug 864207 for *BOTH* the CLI and GUI.

2. If the system was truly compliant/valid in comment 0, then the CLI output would look like this (notice the "No need to update subscriptions" message)...

[root@jsefler-rhel7 ~]# subscription-manager attach

All installed products are covered by valid entitlements. No need to update subscriptions at this time.

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

3. The reason the bug reporter is not seeing the "No need to update subscriptions" message, is probably because the overall system status is "Insufficient".  I'll bet that if the bug reporter ran "subscription-manager status", then the report might look like this...

[root@jsefler-rhel7 product]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Insufficient

Red Hat Enterprise Linux, Standard (up to 2 sockets)(up to 4 Guests):
- Guest has not been reported on any host and is using a temporary unmapped guest subscription.


NEEDINFO: please run "subscription-manager status" to see if your overall system status is "Valid".  If it is valid, then your duplicate calls to "subscription-manager attach" will display the "No need..." message that you are expecting.  If your overall system status is NOT "Valid", then the auto-attach function will run again as you saw in comment 0.

Comment 7 qianzhan 2016-06-03 07:23:56 UTC
Hi John,

I tried again on RHEL7.2 against satellite6.2-20160601.0:

1)

[root@dhcp-128-26 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.0.0.41-Unknown
subscription management rules: 5.15.2
subscription-manager: 1.15.9-15.el7
python-rhsm: 1.15.4-5.el7

2)

[root@dhcp-128-26 ~]# subscription-manager identity
system identity: cacbf4ad-0dcc-4d99-afee-f3caf9af5c1c
name: dhcp-128-26.nay.redhat.com
org name: Default Organization
org ID: Default_Organization
environment name: Library
[root@dhcp-128-26 ~]# subscription-manager attach


Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@dhcp-128-26 ~]# subscription-manager attach


Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

[root@dhcp-128-26 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Insufficient

Red Hat Enterprise Linux Server for PRIMEQUEST, Premium (2 sockets) (L3 Only):
- Guest has not been reported on any host and is using a temporary unmapped
  guest subscription.

3) Open subscription-manager-gui, click 'Auto-attach' button. A window shows 'No need to attach subscriptions at this time'. Please see attachment 'When_status_infficient_gui_shows_no_need_autoattach.png'.


Step 2) meets logic in comment 6, but step 3) does not. How do you think of step 3), John? Need a new bug?

Comment 8 qianzhan 2016-06-03 07:25:45 UTC
Created attachment 1164359 [details]
When_status_insufficient_gui_shows_no_need_autoattach.png

Comment 9 John Sefler 2016-06-03 12:55:12 UTC
Based on the behavior in comment 7, I would argue that subscription-manager-gui is failing to attempt an auto-subscribe for a system whose status is "Insufficient".  Ironically, the CLI is behaving correctly and the GUI is deficient.

Let's keep this bug open for the devel team to review subscription-manager-gui, but I will change the summary title.

Comment 10 William Poteat 2016-06-29 00:26:51 UTC
PR at https://github.com/candlepin/subscription-manager/pull/1437

Comment 11 Chris Snyder 2016-07-08 21:32:25 UTC
master commit:

c9d6a49ad8d373d329996c053ecc9b09a16ebac3

Comment 13 qianzhan 2016-07-14 02:59:56 UTC
Verified.

1. Install RHEL7.2 and upgrade subscription-manager and python-rhsm.
subscription-manager: 1.17.9-1.el7
python-rhsm: 1.17.5-1.el7

2. Register RHEL7.2 to Satellite-6.2.0-RHEL-7-20160713.0, and auto-attach. The status is Insufficient.

Please see attachment 'register_and_auto-attach.png'

3. Open GUI, and click Auto-attach button. The GUI is trying to find a subscription to auto-attach.

Please see attachment 'auto-attach_in_GUI_when_Insufficient_subscription_status.png'

Comment 14 qianzhan 2016-07-14 03:00:40 UTC
Created attachment 1179576 [details]
register_and_auto-attach.png

Comment 15 qianzhan 2016-07-14 03:01:17 UTC
Created attachment 1179577 [details]
auto-attach_in_GUI_when_Insufficient_subscription_status.png

Comment 17 errata-xmlrpc 2016-11-03 20:28:58 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, 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://rhn.redhat.com/errata/RHSA-2016-2592.html


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