Hide Forgot
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:
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?
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.
Created attachment 1157788 [details] notice_when_trying_to_auto-attach_with_an_already_attached_system_in_GUI.png
Moving to sub-man as that is where this bug will be fixed.
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.
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?
Created attachment 1164359 [details] When_status_insufficient_gui_shows_no_need_autoattach.png
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.
PR at https://github.com/candlepin/subscription-manager/pull/1437
master commit: c9d6a49ad8d373d329996c053ecc9b09a16ebac3
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'
Created attachment 1179576 [details] register_and_auto-attach.png
Created attachment 1179577 [details] auto-attach_in_GUI_when_Insufficient_subscription_status.png
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