Bug 863526 - failed registration with activation key leaves system in candlepin
failed registration with activation key leaves system in candlepin
Status: CLOSED WONTFIX
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: --
Assigned To: Tom McKay
Katello QA List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-05 13:53 EDT by Tom McKay
Modified: 2014-03-18 13:38 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-18 13:38:55 EDT
Type: Bug
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 Tom McKay 2012-10-05 13:53:19 EDT
Description of problem:

When system registration with an activation key fails, an entry is left in the candlepin cp_consumer database. This "extra" system is showing up in the dashboard stats.

# subscription-manager register --org 91d8977f-a64a-45f8-af18-d62b8cd818a5 --activationkey test
Not enough entitlements in pools (1), required: 4, available: 2

candlepin=> select * from cp_consumer where name = 'qeclient07.usersys.redhat.com';
                id                |          created           |          updated           | autoheal | entitlementstatus |        lastcheckin         |     
        name              | servicelevel |   username    |                 uuid                 | environment_id |        consumer_idcert_id        |         
   keypair_id            |             owner_id             | type_id | releasever 
----------------------------------+----------------------------+----------------------------+----------+-------------------+----------------------------+-----
--------------------------+--------------+---------------+--------------------------------------+----------------+----------------------------------+---------
-------------------------+----------------------------------+---------+------------
 ff8080813a2c5153013a2db30c3500e3 | 2012-10-04 17:33:59.733-04 | 2012-10-04 17:34:00.254-04 | t        | invalid           |                            | qecl
ient07.usersys.redhat.com |              | hidden-PRuSw1 | 529f082c-2017-44d1-ac8b-cf0686101a23 | 3              | ff8080813a2c5153013a2db30e1600e6 | ff808081
3a2c5153013a2db30e0200e5 | ff8080813a288eee013a28921ddb0003 | 1000    | 
 ff8080813a2c5153013a2db6e390013e | 2012-10-04 17:38:11.472-04 | 2012-10-05 13:27:18.594-04 | t        | valid             | 2012-10-05 13:27:18.594-04 | qecl
ient07.usersys.redhat.com |              | guest         | 37530392-80ea-415e-beed-28b32f49baa1 | 3              | ff8080813a2c5153013a2db6e50f0141 | ff808081
3a2c5153013a2db6e4fd0140 | ff8080813a288eee013a28921ddb0003 | 1000    | 
(2 rows)

katelloschema=> select * from systems where name = 'qeclient07.usersys.redhat.com';
 id |                 uuid                 |             name              |         description         | location | environment_id |         created_at     
    |         updated_at         | system_template_id |  type  
----+--------------------------------------+-------------------------------+-----------------------------+----------+----------------+------------------------
----+----------------------------+--------------------+--------
  9 | 37530392-80ea-415e-beed-28b32f49baa1 | qeclient07.usersys.redhat.com | Initial Registration Params | None     |              3 | 2012-10-04 21:38:12.636
196 | 2012-10-04 21:38:12.636196 |                    | System
(1 row)


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 2 Og Maciel 2012-10-05 15:17:09 EDT
This is how I managed to stumble on this issue:

* Imported a manifest file with "stacked" subscriptions
* Created an organization using i18n characters:  Tupinambá
* Environment: Mild
* Enabled, synced and promoted RHEL 6 Server content to Mild environment
* Created a custom repo, synced and also promoted it to Mild
* Created an activation key, unlimited access, and added all available subscriptions to it
* ssh to a RHEL 6.2 client
* "faked" a multi-socket system

   echo '{"cpu.cpu_socket(s)":"4"}' > /etc/rhsm/facts/sockets.facts

* registered it against my katello instance. Since the organization name had i18n characters, the Details pane for the activation key told me to use the following command:

  subscription-manager register --org 91d8977f-a64a-45f8-af18-d62b8cd818a5 --activationkey test

Note: 91d8977f-a64a-45f8-af18-d62b8cd818a5 was organziation label that was automatically created for me

This process failed:

# subscription-manager register --org 91d8977f-a64a-45f8-af18-d62b8cd818a5 --activationkey test
Not enough entitlements in pools (1), required: 4, available: 2

Ok, so I decided to subscribe to it using the proper Org name:

# subscription-manager register --user guest --password guest --org Tupinambá --env MildThe system has been registered with id: 37530392-80ea-415e-beed-28b32f49baa1
Comment 4 Mike McCune 2014-03-18 13:38:55 EDT
This bug was closed because of a lack of activity.  If you feel this bug should be reconsidered for attention please feel free to re-open the bug with a comment stating why it should be reconsidered.

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