Bug 795715 - KTEnvironment(#70223987213820) expected, got ActiveSupport::HashWithIndifferentAccess(#70224017037820)
KTEnvironment(#70223987213820) expected, got ActiveSupport::HashWithIndiffere...
Status: CLOSED CURRENTRELEASE
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
1.0.0
Unspecified Unspecified
high Severity high
: beta
: 1.0
Assigned To: Tom McKay
SAM QE List
: Regression, Reopened, TestBlocker
Depends On: 795452 795820
Blocks: 703617 786730
  Show dependency treegraph
 
Reported: 2012-02-21 06:19 EST by Hui Wang
Modified: 2013-03-27 16:53 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 795820 (view as bug list)
Environment:
Last Closed: 2012-04-26 20:20:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hui Wang 2012-02-21 06:19:02 EST
Description of problem:

After regitering the host to SAM, the guest will give confused info when registering the guset to SAM.
The guest can be found on the sam web UI,but it is abnormal.
Firstly, if we click the guest, we can't see the fact's details.
Secondly, we can't list available pool of the guest. 
Thirdly, We can't unregister the guest. 

Version-Release number of selected component (if applicable):
katello-headpin-0.1.140-2.el6.noarch
katello-headpin-all-0.1.140-2.el6.noarch
katello-cli-headpin-0.1.15-2.el6.noarch
katello-glue-candlepin-0.1.238-3.el6.noarch
katello-trusted-ssl-cert-1.0-1.noarch
katello-certs-tools-1.0.2-2.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-common-0.1.40-2.el6.noarch
katello-common-0.1.238-3.el6.noarch
katello-httpd-ssl-key-pair-1.0-1.noarch
katello-configure-0.1.64-7.el6.noarch
katello-selinux-0.1.5-3.el6.noarch
candlepin-0.5.21-1.el6.noarch
candlepin-tomcat6-0.5.21-1.el6.noarch
thumbslug-0.0.21-1.el6.noarch


How reproducible:

always

Steps to Reproduce:

1.Install GUEST G on HOST
2.Resgister HOST to SAM useing username/password/org(admin/admin/ACME_Corporation)
3.Start virt-who service on HOST
#service virt-who restart
.............

Sending update to updateConsumer: ['8480ebe4-3875-4fcc-ac6f-c0676ec8b0c5']

4.Resgister GUEST G to SAM useing username/password/org(admin/admin/ACME_Corporation)
# subscription-manager  register --org=ACME_Corporation --force --name guest001
Username: admin
Password: 
KTEnvironment(#70223987213820) expected, got ActiveSupport::HashWithIndifferentAccess(#70224017037820)



Actual results:
After regitering the host to SAM, the guest will give confused info when registering the guset to SAM.

Expected results:

After regitering the host to SAM, the guest will give info: The system has been registered with id: $consumer ID

Additional info:

1.[root@localhost ~]# subscription-manager list --available
	Error updating system data, see /var/log/rhsm/rhsm.log for more details.
	[root@localhost ~]# vim /var/log/rhsm/rhsm.log 
	.........
	2012-02-22 10:46:16,806 [INFO]  @connection.py:362 - Connection Established: host: samserv.redhat.com, port: 443, handler: /headpin/api
	2012-02-22 10:46:27,689 [INFO]  @connection.py:350 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
	2012-02-22 10:46:27,689 [DEBUG]  @connection.py:188 - Loading CA PEM certificates from: /etc/rhsm/ca/
	2012-02-22 10:46:27,690 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-local.pem'
	2012-02-22 10:46:27,690 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
	2012-02-22 10:46:27,691 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
	2012-02-22 10:46:27,692 [DEBUG]  @connection.py:209 - Making request: GET /headpin/api/
	2012-02-22 10:46:27,740 [WARNING]  @connection.py:383 - Error fetching supported resources, this UEPConnection is likely not usable:
	2012-02-22 10:46:27,741 [ERROR]  @connection.py:385 - tlsv1 alert unknown ca
	Traceback (most recent call last):
	  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 376, in _load_supported_resources
	    resources_list = self.conn.request_get("/")
	  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 252, in request_get
	    return self._request("GET", method)
	  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 214, in _request
	    response = conn.getresponse()
	  File "/usr/lib/python2.6/httplib.py", line 990, in getresponse
	    response.begin()
	  File "/usr/lib/python2.6/httplib.py", line 391, in begin
	    version, status, reason = self._read_status()
	  File "/usr/lib/python2.6/httplib.py", line 349, in _read_status
	"/var/log/rhsm/rhsm.log" 487L, 39759C  
        
2.[root@localhost ~]# subscription-manager unregister
	tlsv1 alert unknown ca

3.service virt-who report info:
	Sending update to updateConsumer: ['8480ebe4-3875-4fcc-ac6f-c0676ec8b0c5']
	KTEnvironment(#70223987213820) expected, got ActiveSupport::HashWithIndifferentAccess(#70224017037820)
	Traceback (most recent call last):
	  File "/usr/share/virt-who/virt-who.py", line 143, in _send
	  File "/usr/share/virt-who/subscriptionmanager.py", line 80, in sendVirtGuests
	SubscriptionManagerError: KTEnvironment(#70223987213820) expected, got ActiveSupport::HashWithIndifferentAccess(#70224017037820)
	Error in communication with candlepin, trying to recover
Comment 1 Chris Duryee 2012-02-21 09:07:09 EST
This error appears to be coming from katello/headpin, changing component.
Comment 2 Tom McKay 2012-02-21 10:54:23 EST

*** This bug has been marked as a duplicate of bug 795452 ***
Comment 3 Keqin Hong 2012-02-22 10:43:47 EST
(In reply to comment #2)
> 
> *** This bug has been marked as a duplicate of bug 795452 ***

Hi Tom,

I do not think this is a duplicate of bug 795452, since SAM and cf are two different products.

In fact, if the same bug happens on these two products, one of them can be clone of the other, but for different products.

Reopen this for tracking the fix for SAM

Thanks,
Keqin
Comment 4 Tom McKay 2012-02-22 12:45:46 EST
Actually, it is the same code in both products. This BZ has been fixed in the code base so I will mark it MODIFIED if that makes it easier to track.
Comment 5 Hui Wang 2012-02-22 20:31:08 EST
(In reply to comment #4)
> Actually, it is the same code in both products. This BZ has been fixed in the
> code base so I will mark it MODIFIED if that makes it easier to track.

Tom,
I will verify the issue in the coming build of SAM.
Comment 6 Hui Wang 2012-02-28 01:14:51 EST
I verified the issue, the result is PASS.

Version-Release number of selected component (if applicable):
katello-glue-candlepin-0.1.300-1.el6.noarch
katello-certs-tools-1.0.2-2.el6.noarch
katello-cli-common-0.1.100-2.el6.noarch
katello-httpd-ssl-key-pair-1.0-1.noarch
katello-headpin-0.1.140-3.el6.noarch
katello-headpin-all-0.1.140-3.el6.noarch
katello-selinux-0.1.7-1.el6.noarch
katello-configure-0.1.100-7.el6.noarch
katello-trusted-ssl-cert-1.0-1.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-common-0.1.300-1.el6.noarch
katello-cli-headpin-0.1.15-2.el6.noarch
candlepin-0.5.22-1.el6.noarch
candlepin-tomcat6-0.5.22-1.el6.noarch
thumbslug-0.0.21-1.el6.noarch


verified steps:

1.Install GUEST G on HOST
2.Resgister HOST to SAM useing
username/password/org(admin/admin/ACME_Corporation)
3.Start virt-who service on HOST
#service virt-who restart
.............
Sending update to updateConsumer: ['2f2e18c5-fb00-4c2f-a638-184a42110187']

4.Resgister GUEST G to SAM useing
username/password/org(admin/admin/ACME_Corporation)
# subscription-manager  register --org=ACME_Corporation --force 
Username: admin
Password: 
The system has been registered with id: a63bcd63-5d9e-44b8-b3bd-17556cb67bc7
Comment 8 Hui Wang 2012-02-29 00:33:48 EST
Change the status to verified as comment 6.

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