Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 921268

Summary: virt-only pools are not showing with listall
Product: [Community] Candlepin (Migrated to Jira) Reporter: J.C. Molet <jmolet>
Component: candlepinAssignee: William Poteat <wpoteat>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 0.9CC: wpoteat
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-15 18:30:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 863175, 920191    

Description J.C. Molet 2013-03-13 19:54:46 UTC
Description of problem:
'virt_only = true' pools are somehow being filtered out when a user runs the listall command 

Version-Release number of selected component (if applicable):
#git show
commit 31c9da7824fcf733bd33432af2d326e12a028317
Author: Devan Goodwin <dgoodwin>
Date:   Wed Mar 13 09:50:58 2013 -0300


How reproducible:
always?

Steps to Reproduce:
1. get latest candlepin from master (or see version above)
2. deploy candlepin using TESTDATA=1 or this kind of voodoo:
export TESTDATA=1 && export FORCECERT=1 && export GENDB=1 && export HOSTNAME=$(hostname) && export IMPORTDIR= && cd /root/candlepin && buildconf/scripts/deploy && echo DEPLOYED
3. as the admin:admin user or any user with sufficient rights, register against this candlepin and then run listall either via 'subscription-manager list --available --all' or a call to:
 "/owners/<OWNER>/pools?consumer=<CONSUMER-ID>&listall=true"


Actual results:
Every pool listed is of System Type: Physical 

Expected results:
There would be some of System Type: Virtual, as provided by the ./buildconf/scripts/test_data.json which is loaded.  There are several items in there where virt_only = true

Additional info:
Normal automation from the subscription-manager side wouldn't find this since we compare our list available with the REST call, so this might need a dedicated spec-test.

Comment 1 William Poteat 2013-04-12 18:58:28 UTC
The test data is a bad way to go here. In fact its a bad way to test as it can hide issues from both the developers and QE. There are reasons why a pool would not show on --all. 

Start date is in the future.
The owner is not the same for the pool and the consumer.

I will look at the spec tests to see what is covered.

Comment 2 William Poteat 2013-04-15 18:19:51 UTC
A physical consumer will not get virtual_only pools. They are filtered from consideration at the server. The '--all' flag does not change that filtering.