Description of problem: I registered a personal consumer for a customer that has a subscription for Red Hat Personal. When I register a system consumer using the same username/password, I can list the available Red Hat Personal subscription with RHSM list --avail. After subscribing to the pool, I see a new sub-pool created, which is expected. Then if I call the delete consumer api, it deletes the system consumer and it also deletes the sub-pool. Now when I go back to the client and create a new system consumer and use RHSM to list --avail, I don't see any subscription pools available. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Register a personal consumer 2. Register a system consumer 3. Subscribe to RH Personal subscription 4. Delete system consumer using candlepin delete REST api 5. Use RHSM to create a new system consumer with the same username/password as before 6. Use RHSM to list available pools, and you'll see nothing. Actual results: No pools are available to subscribe Expected results: The same Red Hat Personal subscription should be available. Additional info:
Who do you subscribe with (which consumer0 in step 3?
test7/redhat in hosted.
Steps to Reproduce: 1. Register a personal consumer 2. Subscribe the personal consumer to the RH Personal subscription (this will create the subpool) 2. Register a system consumer using the same username as the person consumer 3. Subscribe the system consumer to RH Personal subscription subpool 4. Delete system consumer using candlepin delete REST api 5. Use RHSM to create a new system consumer with the same username/password as before 6. Use RHSM to list available pools, and you'll see nothing.
Changing to new so folks will pick it up
changing back to myself, as i'm working on it...
Dmitri when you fix a bug please add a comment listing the git hash of the commit that fixes the bug. We need that quite often to know whether we can test the fix yet. Also, it lets us be sure the bug wasn't moved to ON_QA by mistake :)
VERSION... [root@jsefler-onprem01 ~]# rpm -q subscription-manager subscription-manager-0.93.2-1.git.82.b7841b3.fc14.x86_64 [root@jsefler-f12-candlepin candlepin]# git show-ref master 5773be9a35b8697e7e53b3ae23fbb38ba881f0e1 refs/heads/master 5773be9a35b8697e7e53b3ae23fbb38ba881f0e1 refs/remotes/origin/master [root@jsefler-onprem01 ~]# subscription-manager register --username=testuser1 --password=password --type=person 2cc32b25-76a0-438e-8177-ab8d1d8021a5 testuser1 [root@jsefler-onprem01 ~]# subscription-manager list --available +-------------------------------------------+ Available Subscriptions +-------------------------------------------+ ProductName: RHEL Personal ProductId: RH09XYU34 PoolId: ff8080812cc18643012cc1871da1018c Quantity: 5 Expires: 2011-12-06 ProductName: RHEL Personal ProductId: RH09XYU34 PoolId: ff8080812cc18643012cc1871dc5018f Quantity: 10 Expires: 2011-12-06 [root@jsefler-onprem01 ~]# subscription-manager subscribe --pool=ff8080812cc18643012cc1871da1018c [root@jsefler-onprem01 ~]# subscription-manager clean All local data removed [root@jsefler-onprem01 ~]# subscription-manager register --username=testuser1 --password=password --type=system a2838ae9-3953-4b16-bdbd-61431f7c0a20 testuser1 [root@jsefler-onprem01 ~]# subscription-manager list --available | grep -A5 "Personal Bits" ProductName: RHEL Personal Bits ProductId: 1144 PoolId: ff8080812cc18643012cc26250640296 Quantity: unlimited Expires: 2011-12-06 [root@jsefler-onprem01 ~]# subscription-manager subscribe --pool=ff8080812cc18643012cc26250640296 [root@jsefler-onprem01 ~]# curl -k -u admin:admin -X GET https://jsefler-f12-candlepin.usersys.redhat.com:8443/candlepin/consumers/a2838ae9-393-4b16-bdbd-61431f7c0a20 2>/dev/null | grep username "username" : "testuser1", [root@jsefler-onprem01 ~]# [root@jsefler-onprem01 ~]# curl -k -u admin:admin -X delete https://jsefler-f12-candlepin.usersys.redhat.com:8443/candlepin/consumers/a2838ae9-3953-4b16-bdbd-61431f7c0a20 [root@jsefler-onprem01 ~]# curl -k -u admin:admin -X GET https://jsefler-f12-candlepin.usersys.redhat.com:8443/candlepin/consumers/a2838ae9-3953-4b16-bdbd-61431f7c0a20 2>/dev/null | grep username [root@jsefler-onprem01 ~]# [root@jsefler-onprem01 ~]# subscription-manager clean All local data removed [root@jsefler-onprem01 ~]# subscription-manager register --username=testuser1 --password=password --type=system be4e428b-c100-4a80-bc3d-f118e74dd83b testuser1 [root@jsefler-onprem01 ~]# subscription-manager list --available | grep -A5 "Personal Bits" ProductName: RHEL Personal Bits ProductId: 1144 PoolId: ff8080812cc18643012cc26250640296 Quantity: unlimited Expires: 2011-12-06 ^^^^ SUBPOOL RHEL Personal Bits IS STILL AVAILABLE TO A NEW CONSUMER AFTER HAVING DELETED THE FIRST CONSUMING SYSTEM. MOVING BUGZILLA TO VERIFIED will not do some cleanup for the sake of completeness... [root@jsefler-onprem01 ~]# subscription-manager clean All local data removed [root@jsefler-onprem01 ~]# subscription-manager register --username=testuser1 --password=password --type=system be4e428b-c100-4a80-bc3d-f118e74dd83b testuser1 [root@jsefler-onprem01 ~]# subscription-manager list --available | grep -A5 "Personal Bits" ProductName: RHEL Personal Bits ProductId: 1144 PoolId: ff8080812cc18643012cc26250640296 Quantity: unlimited Expires: 2011-12-06 [root@jsefler-onprem01 ~]# subscription-manager subscribe --pool=ff8080812cc18643012cc26250640296 [root@jsefler-onprem01 ~]# subscription-manager list --available | grep -A5 "Personal Bits" [root@jsefler-onprem01 ~]# subscription-manager list --consumed +-------------------------------------------+ Consumed Product Subscriptions +-------------------------------------------+ ProductName: RHEL Personal Bits ContractNumber: 39 AccountNumber: 12331131231 SerialNumber: 1129175265119797 Active: True Begins: 2010-12-06 Expires: 2011-12-06 [root@jsefler-onprem01 ~]# subscription-manager unsubscribe --serial=1129175265119797 [root@jsefler-onprem01 ~]# subscription-manager unregister System has been un-registered. [root@jsefler-onprem01 ~]# subscription-manager register --consumerid=2cc32b25-76a0-438e-8177-ab8d1d8021a5 --username=testuser1 --password=password 2cc32b25-76a0-438e-8177-ab8d1d8021a5 testuser1 [root@jsefler-onprem01 ~]# subscription-manager list --consumed +-------------------------------------------+ Consumed Product Subscriptions +-------------------------------------------+ ProductName: RHEL Personal ContractNumber: 39 AccountNumber: 12331131231 SerialNumber: 1129175141192087 Active: True Begins: 2010-12-06 Expires: 2011-12-06 [root@jsefler-onprem01 ~]# subscription-manager unsubscribe --serial=1129175141192087 [root@jsefler-onprem01 ~]# subscription-manager unregister System has been un-registered. [root@jsefler-onprem01 ~]#