Bug 803814

Summary: Registering with an activation key which has run out of susbcriptions results in a system in SAM, but no identity certificate
Product: [Community] Candlepin Reporter: Bryan Kearney <bkearney>
Component: candlepinAssignee: Bryan Kearney <bkearney>
Status: CLOSED CURRENTRELEASE QA Contact: SAM QE List <sam-qe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.5CC: dgoodwin, esammons, jsefler, ltroan, tkitamur, tomckay, yoguma
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-17 13:03:19 UTC Type: ---
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: 738066, 804059    

Description Bryan Kearney 2012-03-15 17:11:08 UTC
If there are not enough subscriptions available, registration with Activation Key fails as follows:

[root@rhel62-2 ~]# subscription-manager register --org=orgname --activationkey=test1
Not enough entitlements in pools (1), required: 1, available: 0

Even though this command failed, the system is actually registered with SAM (SAM Web-UI shows the
system), but RHSM client indicates the system is NOT registered. Because of this mismatch, neither of
the following commands works.

[root@rhel62-2 ~]# subscription-manager register --org=orgname --force
Username: admin
Password:
Validation failed: Name has already been taken

[root@rhel62-2 ~]# subscription-manager unregister
This system is currently not registered.
This is confusing. The registration status should be the same between SAM and RHSM client even after
the command failure.

Comment 3 Devan Goodwin 2012-03-26 14:36:33 UTC
ConsumerResource.create had no @Transactional annotation, so failures later on were not reverting previous activity in the database. Fix is server side, error should surface on client just as before only now, no consumer will have been created server side.

Comment 4 Devan Goodwin 2012-03-26 18:55:16 UTC
Fixed in candlepin.git master: 530c189e4f0d6984638b5274500a74eeff3d42c5

Will appear in candlepin-0.5.27-1

Comment 6 Tom McKay 2012-03-27 16:18:50 UTC
*** Bug 807300 has been marked as a duplicate of this bug. ***

Comment 9 Yoko Oguma 2012-04-25 00:55:50 UTC
FYI: Status is ON_QA.

Comment 16 Tatsuya Kitamura 2012-07-05 15:27:56 UTC
This problem still occurs with SAM 1.1 (candlepin-0.6.5-1.el6_2.noarch).

Tatsuya Kitamura
Fujitsu on-site engineer

Comment 17 Bryan Kearney 2012-07-17 13:03:19 UTC
Marking all community bugs modified or beyong as closed.