Bug 1376014

Summary: GUI: Register with auto-attach option doesnot attach subscriptions
Product: Red Hat Enterprise Linux 7 Reporter: Shwetha Kallesh <skallesh>
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED ERRATA QA Contact: Jan Stavel <jstavel>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: bcourt, jstavel, khowell, redakkan, skallesh, vrjain, wpoteat
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 19:20:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Shwetha Kallesh 2016-09-14 12:52:56 UTC
Description of problem:
when you try to register valid activation-key and a invalid org and then come back and try to register(normal mode and not using activation key) with auto-attach option,registers the system but fails to attach subscriptions 

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


How reproducible:


Steps to Reproduce:
1. Try to register using valid activation-key and a invalid org
2. Error message pops up saying "Organisation doesnot exist"
3. Click on back button and uncheck "Register using activation key option"
4. Now click on next button and enter valid credentials and "DONOT" select "Manually attach subscriptions after registering option" and click on register


Actual results:
System registers successfully but no subscription is attached

Expected results:
System should register successfully and subscription should be attached


Additional info:

2016-09-14 17:42:35,634 [INFO] subscription-manager-gui:2040:MainThread @connection.py:830 - Connection built: host=subscription.rhn.stage.redhat.com port=443 handler=/subscription auth=none
2016-09-14 17:42:47,531 [INFO] subscription-manager-gui:2040:MainThread @connection.py:830 - Connection built: host=subscription.rhn.stage.redhat.com port=443 handler=/subscription auth=none
2016-09-14 17:42:58,182 [INFO] subscription-manager-gui:2040:RegisterConsumerThread @connection.py:830 - Connection built: host=subscription.rhn.stage.redhat.com port=443 handler=/subscription auth=none
2016-09-14 17:42:59,390 [ERROR] subscription-manager-gui:2040:MainThread @utils.py:138 - None
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/subscription_manager/gui/registergui.py", line 1968, in _register_consumer
    installed_products=installed_mgr.format_for_server())
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 928, in registerConsumer
    return self.conn.request_post(url, params)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 697, in request_post
    return self._request("POST", method, params)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 611, in _request
    self.validateResponse(result, request_type, handler)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 661, in validateResponse
    raise RestlibException(response['status'], error_msg, response.get('headers'))
RestlibException: Organization adsa does not exist.
2016-09-14 17:43:14,210 [INFO] subscription-manager-gui:2040:MainThread @connection.py:830 - Connection built: host=subscription.rhn.stage.redhat.com port=443 handler=/subscription auth=none
2016-09-14 17:43:41,976 [INFO] subscription-manager-gui:2040:GetOwnerListThread @connection.py:830 - Connection built: host=subscription.rhn.stage.redhat.com port=443 handler=/subscription auth=basic username=qa
2016-09-14 17:43:48,016 [INFO] subscription-manager-gui:2040:RegisterConsumerThread @managerlib.py:77 - Consumer created: {'consumer_name': 'dhcp35-195.lab.eng.blr.redhat.com', 'uuid': '20e174a4-9dab-44b0-9840-7ed045071f2d'}
2016-09-14 17:43:48,023 [INFO] subscription-manager-gui:2040:MainThread @managerlib.py:77 - Consumer created: {'consumer_name': 'dhcp35-195.lab.eng.blr.redhat.com', 'uuid': '20e174a4-9dab-44b0-9840-7ed045071f2d'}
2016-09-14 17:43:48,024 [INFO] subscription-manager-gui:2040:MainThread @connection.py:830 - Connection built: host=subscription.rhn.stage.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ verify=False
2016-09-14 17:43:49,490 [INFO] subscription-manager-gui:2040:MainThread @cert_sorter.py:205 - Product status: valid_products= partial_products= expired_products= unentitled_producs=69 future_products= valid_until=None
2016-09-14 17:43:50,609 [INFO] rhsmd:3837:MainThread @rhsmd:261 - rhsmd started
2016-09-14 17:43:50,664 [INFO] rhsmd:3837:MainThread @connection.py:830 - Connection built: host=subscription.rhn.stage.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ verify=False
2016-09-14 17:43:51,932 [INFO] rhsmd:3837:MainThread @cert_sorter.py:205 - Product status: valid_products= partial_products= expired_products= unentitled_producs=69 future_products= valid_until=None
2016-09-14 17:43:57,308 [INFO] subscription-manager-gui:2040:RefreshThread @entcertlib.py:131 - certs updated:
Total updates: 0
Found (local) serial# []
Expected (UEP) serial# []
Added (new)
  <NONE>
Deleted (rogue):
  <NONE>
2016-09-14 18:04:54,241 [INFO] rhsmcertd-worker:4114:MainThread @connection.py:830 - Connection built: host=subscription.rhn.stage.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ verify=False
2016-09-14 18:04:55,910 [INFO] rhsmcertd-worker:4114:MainThread @entcertlib.py:131 - certs updated:
Total updates: 0
Found (local) serial# []
Expected (UEP) serial# []
Added (new)
  <NONE>
Deleted (rogue):
  <NONE>
2016-09-14 18:04:58,985 [ERROR] rhsmcertd-worker:4114:MainThread @cache.py:128 - Unable to read cache: /var/lib/rhsm/cache/written_overrides.json
2016-09-14 18:05:00,425 [INFO] rhsmcertd-worker:4114:MainThread @repolib.py:303 - repos updated: Repo updates

Total repo updates: 0
Updated
    <NONE>
Added (new)
    <NONE>
Deleted
    <NONE>
2016-09-14 18:05:00,429 [WARNING] rhsmcertd-worker:4114:MainThread @config.py:115 - /etc/ostree/remotes.d does not exist, so unable to save /etc/ostree/remotes.d/redhat.conf
2016-09-14 18:05:00,729 [WARNING] rhsmcertd-worker:4114:MainThread @model.py:421 - OstreeGIWrapperError: Error looking up OSTree origin file. 'python /usr/lib/python2.7/site-packages/subscription_manager/plugin/ostree/gi_wrapper.py --deployed-origin' returned exist status: 1
2016-09-14 18:05:00,821 [INFO] rhsmcertd-worker:4114:MainThread @hwprobe.py:916 - collected virt facts: virt.is_guest=True, virt.host_type=kvm, virt.uuid=54ae9fe1-782a-46d6-b8b6-787133278028
2016-09-14 18:09:47,707 [INFO] rhsmd:4204:MainThread @rhsmd:261 - rhsmd started
2016-09-14 18:09:47,765 [INFO] rhsmd:4204:MainThread @connection.py:830 - Connection built: host=subscription.rhn.stage.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ verify=False
2016-09-14 18:09:48,962 [INFO] rhsmd:4204:MainThread @cert_sorter.py:205 - Product status: valid_products= partial_products= expired_products= unentitled_producs=69 future_products= valid_until=None

Comment 1 Shwetha Kallesh 2016-09-14 12:55:15 UTC
Forgot to mention the version

[root@dhcp35-195 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.51.15-1
subscription management rules: 5.15.1
subscription-manager: 1.17.14-1.el7
python-rhsm: 1.17.9-1.el7

Comment 3 Shwetha Kallesh 2016-09-14 16:16:40 UTC
Same is the case with initial-setup

Comment 6 RHEL Program Management 2016-09-15 13:54:25 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

Comment 7 Barnaby Court 2016-09-15 13:59:57 UTC
re-opening this as it should be fixed for 7.4

Comment 9 Jan Stavel 2017-03-30 18:37:19 UTC
I have tested subscription-manager-gui. It works well.

  Red Hat Enterprise Linux Server release 7.4 Beta (Maipo)
  ----------------------------
  server type                      This system is currently not registered.
  subscription management server   0.9.51.21-1
  subscription management rules    5.15.1
  subscription-manager             1.19.4-1.el7
  python-rhsm                      1.19.2-1.el7
  ----------------------------     ----------------------------
  Product                          ----------------------------               ----------------------------
  Entitlement                      ----------------------------               ----------------------------

Comment 10 Jan Stavel 2017-03-30 20:17:02 UTC
I have verified that 'initial-setup' works well with the scenarion above.

Comment 12 errata-xmlrpc 2017-08-01 19:20:42 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://access.redhat.com/errata/RHBA-2017:2083