Bug 808360

Summary: Activation keys - "Not enough entitlements" - no need to register even on our side
Product: Red Hat Satellite Reporter: Garik Khachikyan <gkhachik>
Component: APIAssignee: Tom McKay <tomckay>
Status: CLOSED UPSTREAM QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.0CC: mkoci, mmccune
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-19 18:15: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:

Description Garik Khachikyan 2012-03-30 09:08:03 UTC
Description of problem:
RHSM registration with activation key considers that system not registered to CFSE if there are not enough entitlements available.

Version-Release number of selected component (if applicable):
katello-certs-tools-1.0.4-1.el6.noarch
katello-glue-candlepin-0.1.306-1.el6.noarch
candlepin-tomcat6-0.5.26-1.el6.noarch
qpid-cpp-client-0.12-6.el6.x86_64
pulp-1.0.0-4.el6.noarch
katello-selinux-0.1.8-1.el6.noarch
qpid-cpp-client-ssl-0.12-6.el6.x86_64
katello-agent-0.17-1.el6.noarch
katello-cli-tests-0.1.27-1.git.0.5070dfd.el6.noarch
mod_wsgi-3.3-3.pulp.el6.x86_64
katello-common-0.1.306-1.el6.noarch
candlepin-0.5.26-1.el6.noarch
katello-configure-0.1.104-1.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch
pulp-selinux-server-1.0.0-4.el6.noarch
python-isodate-0.4.4-4.pulp.el6.noarch
katello-glue-pulp-0.1.306-1.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
python-oauth2-1.5.170-2.pulp.el6.noarch
python-qpid-0.12-1.el6.noarch
pulp-common-1.0.0-4.el6.noarch
katello-glue-foreman-0.1.306-1.el6.noarch
qpid-cpp-server-0.12-6.el6.x86_64
katello-0.1.306-1.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
qpid-cpp-server-ssl-0.12-6.el6.x86_64
katello-cli-common-0.1.107-1.el6.noarch
katello-cli-0.1.107-1.el6.noarch
m2crypto-0.21.1.pulp-7.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.import manifest, enable RHEL6Server repo and consume all subscriptions there
2.make one more custom repo and promote to an environment
3.create an activation key for that env. and add that both repos (RHEL one and that custom repo)
4. use that key now to register a system via RHSM register.

Actual results:
Not enough entitlements in pools (1), required: 1, available: 0
exit code: 255
subscription-manager refresh says: "Error: You need to register this system by running `register` command before using this option."
Katello UI says: your system is registered, is "red" - as not enough entitlements there, and als0: consumes that custom repo (see under "Subscriptions" tab for that system)


Expected results:
As RHSM "don't care" when there is not enough entitlements, we don't need even to register the system on our side and surely not consume any repo.
Additional info:

Comment 2 Mike McCune 2012-05-09 15:17:57 UTC
Looks like we are leaving database artifacts in Katello's database on failed registrations that we need to rollback

Comment 3 Tom McKay 2012-09-11 14:48:30 UTC
Tested in latest katello and failed registration did not leave system behind.

Comment 4 Mike McCune 2013-09-19 18:15:19 UTC
These bugs have been resolved in upstream projects for a period of months so I'm mass-closing them as CLOSED:UPSTREAM.  If this is a mistake feel free to re-open.