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:
Looks like we are leaving database artifacts in Katello's database on failed registrations that we need to rollback
Tested in latest katello and failed registration did not leave system behind.
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.