Bug 1138540

Summary: Sometimes failed to subscribe or list subscriptions
Product: [Retired] Subscription Asset Manager Reporter: Liushihui <shihliu>
Component: katelloAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED WONTFIX QA Contact: SAM QE List <sam-qe-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.4.1CC: bkearney, ldai, liliu, sgao
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-26 20:37:56 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 971511    

Description Liushihui 2014-09-05 06:41:38 UTC
Description of problem:
After registered to SAM server, then subscribe an instance base subscription, it will generate Runtime error message. 
"Runtime Error could not execute statement at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse:2,094"

Version-Release number of selected component (if applicable):
subscription-manager-1.12.14-2.el6.x86_64
python-rhsm-1.12.5-2.el6.x86_64
virt-who-0.10-7.el6.noarch
katello-headpin-1.4.3.26-1.el6sam_splice.noarch
candlepin-0.9.6.5-1.el6sam.noarch

How reproducible:
occasional, about 5%

Steps to Reproduce:
SAM server: 10.66.128.175
1.Register to SAM server
# subscription-manager register --username=admin --password=admin
2.Update the cpu to 8
# echo '{"cpu.cpu_socket(s)":"8"}' > /etc/rhsm/facts/custom.facts
# subscription-manager facts --update
3.Subscribe 4 instance base subscriptions
subscription-manager subscribe --pool=8ac200a547d205550147d208441902b1 --quantity=4


Actual results:
Failed to subscribe this pool, it will generate error message as the following:
Runtime Error could not execute statement at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse:2,094 

Expected results:
It should subscribe the pool successfully.

Additional info:

Comment 1 Liushihui 2014-09-12 08:42:40 UTC
sometime failed to list the available subscriptions
# subscription-manager list --available
Runtime Error Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched:81

Comment 2 Liushihui 2014-12-11 02:41:49 UTC
It still exist on RHEL7.1-20141204.2-Server-x86_64 against SAM-1.4.1-RHEL-6-20141113.0. when list available subscriptions, sometimes it still show error as the following:
Runtime Error Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched:81

Packages Tested:
subscription-manager-1.13.9-1.el7.x86_64
python-rhsm-1.13.8-1.el7.x86_64
virt-who-0.11-4.el7.noarch
katello-headpin-1.4.3.28-1.el6sam_splice.noarch
candlepin-0.9.6.5-1.el6sam.noarch

Comment 3 Bryan Kearney 2017-06-26 20:37:56 UTC
The release of Satellite 5.8 we are deprecating the support of Subscription Asset Manager. The release notes for 5.8 can be found at https://access.redhat.com/documentation/en-us/red_hat_satellite/5.8/pdf/release_notes/Red_Hat_Satellite-5.8-Release_Notes-en-US.pdf.

I am therefore closing out this bug as WONTFIX. If you believe this to be an error, please feel free tor each out to either Rich Jerrido or Bryan Kearney. Thank you!