Bug 997869 - Unable to subscribe a system to a valid pool ID
Unable to subscribe a system to a valid pool ID
Status: CLOSED ERRATA
Product: Subscription Asset Manager
Classification: Red Hat
Component: candlepin (Show other bugs)
1.3
x86_64 Linux
unspecified Severity high
: rc
: ---
Assigned To: Katello Bug Bin
Tazim Kolhar
:
Depends On:
Blocks: sam13-tracker 999543
  Show dependency treegraph
 
Reported: 2013-08-16 06:43 EDT by Tazim Kolhar
Modified: 2016-04-25 20:55 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 999543 (view as bug list)
Environment:
Last Closed: 2013-10-01 07:19:50 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)
Manifest used to upload (84.65 KB, application/zip)
2013-08-21 01:02 EDT, Tazim Kolhar
no flags Details
error logs (12.48 KB, text/plain)
2013-08-22 13:00 EDT, sthirugn@redhat.com
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2013:1390 normal SHIPPED_LIVE Release 1.3 of Subscription Asset Manager 2013-10-01 10:43:14 EDT

  None (edit)
Description Tazim Kolhar 2013-08-16 06:43:40 EDT
Description of problem:
Unable to subscribe a system to a valid pool ID using cli commands

Version-Release number of selected component (if applicable):
# rpm -qa | grep katello
katello-selinux-1.4.4-2.el6sat.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-cli-common-1.4.3-7.el6sat.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-configure-1.4.4-2.el6sat.noarch
signo-katello-0.0.20-1.el6sat.noarch
katello-glue-candlepin-1.4.3-8.el6sam_splice.noarch
katello-cli-1.4.3-7.el6sat.noarch
katello-common-1.4.3-8.el6sam_splice.noarch
katello-headpin-1.4.3-8.el6sam_splice.noarch
katello-headpin-all-1.4.3-8.el6sam_splice.noarch
katello-glue-elasticsearch-1.4.3-8.el6sam_splice.noarch


How reproducible:
everytime

Steps to Reproduce:

# headpin -u admin -p **** org subscriptions --name ACME_Corporation 
------------------------------------------------------------------------------------------------------------------------------------------------------
                                                             Organization's Subscriptions
------------------------------------------------------------------------------------------------------------------------------------------------------

Subscription    : Red Hat Enterprise Linux Server, Self-support (1-2 sockets) (Up to 1 guest)
Consumed        : 0
Contract Number : None
SLA             : 
ID              : 8a90c041408684b6014086873902007d
Limits:
    [ Sockets: 2 ]
Start Date      : 2012/12/31 05:00:00
End Date        : 2013/12/31 04:59:59


Subscription    : Resilient Storage (8 sockets)
Consumed        : 0
Contract Number : None
SLA             : 
ID              : 8a90c041408684b60140868738d1006a
Limits:
    [ Sockets: 8 ]
Start Date      : 2012/12/31 05:00:00
End Date        : 2013/12/31 04:59:59


Subscription    : High-Availability (8 sockets)
Consumed        : 0
Contract Number : None
SLA             : 
ID              : 8a90c041408684b60140868738790055
Limits:
    [ Sockets: 8 ]
Start Date      : 2012/12/31 05:00:00
End Date        : 2013/12/31 04:59:59



# headpin -u admin -p **** system subscribe --pool 8a90c041408684b6014086873902007d --org ACME_Corporation --name dell-pe840-01.rhts.eng.bos.redhat.com
Runtime Error null at org.candlepin.audit.Event.<init>:151



Actual results:


Expected results:


Additional info:
Comment 1 Adam Price 2013-08-20 14:32:33 EDT
i am unable to reproduce. could you try again and make sure this is still broken, or provide more detailed steps to reproduce? Thanks!
Comment 2 Tazim Kolhar 2013-08-21 01:02:47 EDT
Created attachment 788716 [details]
Manifest used to upload


# headpin -u admin -p admin provider import_manifest --name 'Red Hat' --org ACME_Corporation --file '/tmp/manifest_org_sla.zip' --force
Provider [ Red Hat ] manifest import complete

# headpin -u admin -p admin org subscriptions --name ACME_Corporation
--------------------------------------------------------------------------------
                          Organization's Subscriptions
--------------------------------------------------------------------------------

Subscription    : Resilient Storage (8 sockets)
Consumed        : 0
Contract Number : None
SLA             : 
ID              : 8a90c041409f37ef01409f3ad9160065
Limits:
    [ Sockets: 8 ]
Start Date      : 2012/12/31 05:00:00
End Date        : 2013/12/31 04:59:59


Subscription    : Red Hat Enterprise Linux Server, Self-support (1-2 sockets) (Up to 1 guest)
Consumed        : 0
Contract Number : None
SLA             : 
ID              : 8a90c041409f37ef01409f3ad8ee0053
Limits:
    [ Sockets: 2 ]
Start Date      : 2012/12/31 05:00:00
End Date        : 2013/12/31 04:59:59


Subscription    : High-Availability (8 sockets)
Consumed        : 0
Contract Number : None
SLA             : 
ID              : 8a90c041409f37ef01409f3ad8860042
Limits:
    [ Sockets: 8 ]
Start Date      : 2012/12/31 05:00:00
End Date        : 2013/12/31 04:59:59


# subscription-manager register --org="ACME_Corporation"
This system is already registered. Use --force to override
[root@dell-pe840-01 ~]# subscription-manager register --org="ACME_Corporation" --force
Username: admin
Password: 
The system has been registered with id: 9034a934-c93c-4023-9828-9b32d80171e9 

# headpin -u admin -p admin system subscribe --pool 8a90c041409f37ef01409f3ad8860042 --org ACME_Corporation --name dell-pe840-01.rhts.eng.bos.redhat.com
Runtime Error null at org.candlepin.audit.Event.<init>:151
Comment 3 Tazim Kolhar 2013-08-21 01:10:06 EDT
Please refer the latest test report :

- http://hudson.rhq.lab.eng.bos.redhat.com:8080/hudson/view/qe-headpin/job/official-sam-cli/17/ReportNG_Report/


Class : com.redhat.qe.katello.tests.cli.OrgTests
Method : test_SLAOrg
Comment 4 Tazim Kolhar 2013-08-21 04:38:02 EDT
facing this issue on RHEL version

# cat /etc/issue
Red Hat Enterprise Linux Server release 6.4 (Santiago)
Kernel \r on an \m
Comment 5 Adam Price 2013-08-21 16:37:06 EDT
what version of candlepin? i still can't reproduce
Comment 7 Tazim Kolhar 2013-08-22 01:08:02 EDT
Version of candlepin : 

# rpm -qa | grep candlepin
candlepin-scl-quartz-2.1.5-5.el6_4.noarch
candlepin-scl-runtime-1-5.el6_4.noarch
candlepin-selinux-0.8.20-1.el6sam.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
candlepin-tomcat6-0.8.20-1.el6sam.noarch
katello-glue-candlepin-1.4.3-8.el6sam_splice.noarch
candlepin-scl-rhino-1.7R3-1.el6_4.noarch
candlepin-cert-consumer-dell-pe840-01.rhts.eng.bos.redhat.com-1.0-1.noarch
candlepin-0.8.20-1.el6sam.noarch
candlepin-scl-1-5.el6_4.noarch
Comment 8 sthirugn@redhat.com 2013-08-22 13:00:15 EDT
Created attachment 789276 [details]
error logs
Comment 10 Devan Goodwin 2013-09-03 14:12:06 EDT
The line in question appears to indicate their is no principal authenticated. The problem looks like it might only surface if binding to a pool with virt_limit which will make a sub-pool for guests.

this.principalStore = Util.toJson(principal.getData());

Does this help reproduce? Could there be some problem with headpin command and how it authenticates with Candlepin that is different from the webUI?

I can't really see any path through the code that would have a null principal however.
Comment 11 Tazim Kolhar 2013-09-05 12:45:26 EDT
Hi,

   Have tried again on one of the server

#  headpin -u admin -p admin provider import_manifest --name 'Red Hat' --org ACME_Corporation --file '/tmp/manifest_org_sla.zip' --force
Provider [ Red Hat ] manifest import complete

#  headpin -u admin -p admin org subscriptions --name ACME_Corporation
------------------------------------------------------------------------------------------------------------------------------------------------------
                                                             Organization's Subscriptions
------------------------------------------------------------------------------------------------------------------------------------------------------

Subscription    : High-Availability (8 sockets)
Consumed        : 0
Contract Number : None
SLA             : 
ID              : 8aa2b6a840ec7a630140eefd274d061b
Limits:
    [ Sockets: 8 ]
Start Date      : 2012/12/31 05:00:00
End Date        : 2013/12/31 04:59:59


Subscription    : Red Hat Enterprise Linux Server, Self-support (1-2 sockets) (Up to 1 guest)
Consumed        : 0
Contract Number : None
SLA             : 
ID              : 8aa2b6a840ec7a630140eefd27350609
Limits:
    [ Sockets: 2 ]
Start Date      : 2012/12/31 05:00:00
End Date        : 2013/12/31 04:59:59


Subscription    : Resilient Storage (8 sockets)
Consumed        : 0
Contract Number : None
SLA             : 
ID              : 8aa2b6a840ec7a630140eefd271a05f8
Limits:
    [ Sockets: 8 ]
Start Date      : 2012/12/31 05:00:00
End Date        : 2013/12/31 04:59:59

#  subscription-manager register --org="ACME_Corporation" --force

The system with UUID e16c8d19-5c12-466d-8fbd-b70ba9976f1e has been unregistered
Username: admin
Password: 
The system has been registered with ID: 595b9ca0-abe9-4766-a152-fc9a7872e7f0 

# headpin -u admin -p admin system subscribe --pool 8aa2b6a840ec7a630140eefd27350609 --org ACME_Corporation --name ibm-ls22-04.rhts.eng.brq.redhat.com
Runtime Error null at org.candlepin.audit.Event.<init>:151
Comment 14 Tazim Kolhar 2013-09-06 02:59:09 EDT
Hi,

  I tried to reproduce this on a fresh sam1.3 snap5
  Got below results

   # headpin -u admin -p admin org subscriptions --name ACME_Corporation
------------------------------------------------------------------------------------------------------------------------------------------------------
                                                             Organization's Subscriptions
------------------------------------------------------------------------------------------------------------------------------------------------------

Subscription    : Resilient Storage (8 sockets)
Consumed        : 0
Contract Number : None
SLA             : 
ID              : 8a90a86f40f206a20140f20bed130064
Limits:
    [ Sockets: 8 ]
Start Date      : 2012/12/31 05:00:00
End Date        : 2013/12/31 04:59:59


Subscription    : Red Hat Enterprise Linux Server, Self-support (1-2 sockets) (Up to 1 guest)
Consumed        : 0
Contract Number : None
SLA             : 
ID              : 8a90a86f40f206a20140f20becee0053
Limits:
    [ Sockets: 2 ]
Start Date      : 2012/12/31 05:00:00
End Date        : 2013/12/31 04:59:59


Subscription    : High-Availability (8 sockets)
Consumed        : 0
Contract Number : None
SLA             : 
ID              : 8a90a86f40f206a20140f20becb40042
Limits:
    [ Sockets: 8 ]
Start Date      : 2012/12/31 05:00:00
End Date        : 2013/12/31 04:59:59


# headpin -u admin -p admin system subscribe --pool 8a90a86f40f206a20140f20becb40042 --org ACME_Corporation --name ibm-x3650m4-02-vm-02.lab.eng.bos.redhat.com
Successfully attached subscription to System [ ibm-x3650m4-02-vm-02.lab.eng.bos.redhat.com ]

# headpin -u admin -p admin system subscriptions --org ACME_Corporation --name ibm-x3650m4-02-vm-02.lab.eng.bos.redhat.com
------------------------------------------------------------------------------------------------------------------------------------------------------
                                   Current Subscriptions for System [ ibm-x3650m4-02-vm-02.lab.eng.bos.redhat.com ]
------------------------------------------------------------------------------------------------------------------------------------------------------

Subscription ID   : 8a90a86f40f206a20140f20e4d51007e
Serial ID         : 6391097772814688868
Pool Name         : High-Availability (8 sockets)
Pool Type         : physical
Consumed          : 1
Quantity          : 1
SLA               : Layered
Contract Number   : None
Provided Products : Not Applicable


Was unable to re-produce 

Thanks !!
Comment 15 Tazim Kolhar 2013-09-06 03:00:14 EDT
The rpm's used for testing

# rpm -qa | grep katello
katello-glue-elasticsearch-1.4.3-12.el6sam_splice.noarch
katello-cli-common-1.4.3-10.el6sat.noarch
katello-common-1.4.3-12.el6sam_splice.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-glue-candlepin-1.4.3-12.el6sam_splice.noarch
katello-headpin-all-1.4.3-12.el6sam_splice.noarch
katello-cli-1.4.3-10.el6sat.noarch
katello-selinux-1.4.4-2.el6sat.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-configure-1.4.4-4.el6sat.noarch
katello-headpin-1.4.3-12.el6sam_splice.noarch
Comment 17 errata-xmlrpc 2013-10-01 07:19:50 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1390.html

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