Bug 749184

Summary: Subscription manager displays products from the Locker
Product: Red Hat Satellite Reporter: Tomas Strachota <tstrachota>
Component: katello-agentAssignee: Tomas Strachota <tstrachota>
Status: CLOSED NOTABUG QA Contact: Garik Khachikyan <gkhachik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: bkearney, cpelland, gkhachik, lzap, mkoci, mmccune
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-0.2.35-1; subscription-manager-0.99.12-1; candlepin-0.5.27-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-25 16:59:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Tomas Strachota 2011-10-26 12:35:05 UTC
Description of problem:
Subscription manager always displays products from the Locker independently of the environment your machine is registered to.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create an environment Development in ACME_Corporation
2. Create a provider and product "katello", with a repo "f14-x86-64", url of
http://repos.fedorapeople.org/repos/katello/katello/fedora-14/x86_64/
3. Run subscription-manager, register the system to the Development environment and update available subscriptions
4. You will see katello product listed
  
Actual results:
All products in the system are listed in available subscriptions.


Expected results:
Only products from the environment your machine is registered to should be visible.


Additional info:

Comment 2 Lukas Zapletal 2012-02-07 12:28:11 UTC
I don't see this anymore.

Comment 4 Garik Khachikyan 2012-02-09 12:11:41 UTC
# REOPEN

issue is there still.

Scenario is:
1. create prov/prod/repo - pulp (url: http://repos.fedorapeople.org/repos/pulp/pulp/6Server/x86_64/)
2. Sync the repo (now it's in "Library")
3. create environment. DON'T promote any content there.
4. register a system to that environment.
5. run: subscription-manager list --available

enjoy seeing that pulp repo in the list of available subscriptions.

checked against:
---
katello-0.1.228-1.git.5.eabe87d.el6.noarch
katello-cli-0.1.54-1.git.0.2670189.el6.noarch
subscription-manager-0.99.6-1.el6.x86_64
pulp-0.0.265-1.el6.noarch
candlepin-0.5.8-1.el6.noarch

Comment 6 Garik Khachikyan 2012-02-22 13:04:41 UTC
# REOPEN

Here is the scenario:
I had already a repo promoted to Dev environment (called: Zoo)

Now I have prepared and synced the Pulp "for RHEL6" but *NOT* promoted to the Dev yet.

subscribing my system to that Katello I could see:
---

subscription-manager list --available
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+

ProductName:          	Pulp for RHEL6           
ProductId:            	1329916060927            
PoolId:               	8aa29ab335a4866f0135a52ca5ea003c
Quantity:             	unlimited                
Multi-Entitlement:    	No                       
Expires:              	02/14/2042               
MachineType:          	physical                 

ProductName:          	Zoo                      
ProductId:            	1329906247327            
PoolId:               	8aa29ab335a4866f0135a496e81e0006
Quantity:             	unlimited                
Multi-Entitlement:    	No                       
Expires:              	02/14/2042               
MachineType:          	physical                 


which is wrong, --all option should bring the product "Pulp for RHEL6" and the --available option ONLY - not.

Comment 8 Tomas Strachota 2012-05-14 13:08:50 UTC
Everything seems to work since candlepin introduced environemnts.

1) create a product with some repos
2) register to an environment
3) `subscription-manager list --available` -> shows the available subscriptions for the product
4) subscribe to it -> successfully consumed, restart rhsmcertd -> repos are not listed in redhat.repo, which is correct
5) promote the product to the environment
6) restart rhsmcertd -> the repos are now available

Tested with:
katello-0.2.35-1
subscription-manager-0.99.12-1
candlepin-0.5.27-1

Comment 10 Bryan Kearney 2012-06-25 16:59:31 UTC
ACK.. not a bug. This is performing as expected. If you have a subscription, you should be able to assign it to a machine. However, you should only get content when it that content is promoted.