Bug 756628 - Unable to entitle consumer to the pool with id '8a90f85733d31add0133d337f9410c52'.: virt.guest.host.does.not.match.pool.owner
Summary: Unable to entitle consumer to the pool with id '8a90f85733d31add0133d337f9410...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Devan Goodwin
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: 715031
TreeView+ depends on / blocked
 
Reported: 2011-11-24 04:18 UTC by John Sefler
Modified: 2015-05-14 15:23 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-29 19:05:55 UTC
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2011-11-24 04:18:29 UTC
Description of problem:
In a negative test attempt to subscribe a consumer (whose host has not registered) to a virt_only pool_derived "bonus pool" on a standalone candlepin, I am encountering this stderr message:
Unable to entitle consumer to the pool with id '8a90f85733d31add0133d337f9410c52'.: virt.guest.host.does.not.match.pool.owner
The fact that my attempt to subscribe is blocked seems correct to me and the reason also seems correct to me.  The format for the reason, "virt.guest.host.does.not.match.pool.owner", is like no other message I've seen.


Version-Release number of selected component (if applicable):
[root@jsefler-onprem-5server ~]# curl -k -u testuser1:password --request GET https://jsefler-f14-5candlepin.usersys.redhat.com:8443/candlepin/status | python -m simplejson/tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0    65    0    65    0     0    641      0 --:--:-- --:--:-- --:--:--     0
{
    "release": "1", 
    "result": true, 
    "standalone": true, 
    "version": "0.5.0"
}


How reproducible:


Steps to Reproduce:
1. Against a standalone candlepin (with the TESTDATA deployed), find a virt_only pool_derived "bonus pool"...

[root@jsefler-onprem-5server ~]# curl -k -u testuser1:password --request GET https://jsefler-f14-5candlepin.usersys.redhat.com:8443/candlepin/owners/admin/pools/ | python -m simplejson/tool | grep pool_derived -B20 -A20
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  121k    0  121k    0     0   274k      0 --:--:-- --:--:-- --:--:--  940k
        "accountNumber": "12331131231", 
        "activeSubscription": true, 
        "attributes": [
            {
                "created": "2011-11-24T01:37:00.737+0000", 
                "id": "8a90f85733d31add0133d337f9410c53", 
                "name": "requires_consumer_type", 
                "updated": "2011-11-24T01:37:00.737+0000", 
                "value": "system"
            }, 
            {
                "created": "2011-11-24T01:37:00.737+0000", 
                "id": "8a90f85733d31add0133d337f9410c54", 
                "name": "requires_host", 
                "updated": "2011-11-24T01:37:00.737+0000", 
                "value": "ff42d1e9-5040-4723-a446-cf025c1c8004"
            }, 
            {
                "created": "2011-11-24T01:37:00.737+0000", 
                "id": "8a90f85733d31add0133d337f9410c56", 
                "name": "pool_derived", 
                "updated": "2011-11-24T01:37:00.737+0000", 
                "value": "true"
            }, 
            {
                "created": "2011-11-24T01:37:00.737+0000", 
                "id": "8a90f85733d31add0133d337f9410c55", 
                "name": "virt_only", 
                "updated": "2011-11-24T01:37:00.737+0000", 
                "value": "true"
            }
        ], 
        "consumed": 0, 
        "contractNumber": "35", 
        "created": "2011-11-24T01:37:00.737+0000", 
        "endDate": "2012-11-22T00:00:00.000+0000", 
        "exported": 0, 
        "href": "/pools/8a90f85733d31add0133d337f9410c52", 
        "id": "8a90f85733d31add0133d337f9410c52", 
        "owner": {
            "displayName": "Admin Owner", 
--


2. Now register a new consumer and attempt to subscribe to the pool id above...

[root@jsefler-onprem-5server ~]# subscription-manager register --username testuser1 --password password --org admin
The system has been registered with id: ada4809f-a937-47f3-b7a7-e8391ca741c2 
[root@jsefler-onprem-5server ~]# subscription-manager subscribe --pool 8a90f85733d31add0133d337f9410c52
Unable to entitle consumer to the pool with id '8a90f85733d31add0133d337f9410c52'.: virt.guest.host.does.not.match.pool.owner
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                THE FORMAT FOR THIS FAILED SUBSCRIBE ATTEMPT COULD BE IMPROVED


  
Actual results:


Expected results:


Additional info:

Comment 1 Devan Goodwin 2011-12-01 16:35:31 UTC
We cannot do translations inside the js rules file, so instead we return error 'keys' and then the Java code if/else's these looking for what it knows, and translates appropriately.

These are disjoint, so it's super easy to add a new error key and forget to translate it elsewhere.

I've added entries for everything I could find that wasn't already covered, but this is very likely to happen again. Not sure how to do it better at this point.

Fixed in candlepin.git master 5fc5d7a3f1bc91cb27dacc927cd1c83f95f18ecf, will appear in candlepin-0.5.3.

Comment 2 John Sefler 2011-12-02 22:46:50 UTC
Verifying Version...
[root@jsefler-onprem-5server ~]# rpm -q subscription-manager
subscription-manager-0.98.3-1.git.24.65494c7.el5_7
[root@jsefler-f14-5candlepin candlepin]# git branch
  0.2
  0.3
  0.4
* master
[root@jsefler-f14-5candlepin candlepin]# git show-ref | grep master
5fc5d7a3f1bc91cb27dacc927cd1c83f95f18ecf refs/heads/master
5fc5d7a3f1bc91cb27dacc927cd1c83f95f18ecf refs/remotes/origin/master


Choose the right pool as described in comment 0 and then...
[root@jsefler-onprem-5server ~]# subscription-manager subscribe --pool 8a90f85733fc4df80133fc6f6bf50e29 
Guest's host does not match owner of pool: '8a90f85733fc4df80133fc6f6bf50e29'.
[root@jsefler-onprem-5server ~]# 

^^^ THIS FAILED SUBSCRIBE ATTEMPT MESSAGE IS IMPROVED

In comment 1, Devan alludes to more cases affected by the same root problem.  I don't know what is needed to trigger/test them.

moving this case to VERIFIED...


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