Bug 710141

Summary: OwnerInfo needs to only show info for pools that are active right now, for all the stats
Product: [Community] Candlepin Reporter: Tyler Smart <tsmart>
Component: candlepinAssignee: Bryan Kearney <bkearney>
Status: CLOSED CURRENTRELEASE QA Contact: John Sefler <jsefler>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 0.5CC: bkearney
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-17 13:03:53 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 Tyler Smart 2011-06-02 14:22:43 UTC
Description of problem:

<smarts> jbowes, OwnerInfo bug
<smarts> when I Call pools on a user with expired subs
<smarts> the pools say empty
<smarts> but the OwnerInfo call says 2 for system
<smarts> consumerTypeCountByPool in OwnerInfo
<smarts> for ex: in dev pointing to candlepin dev 1
<smarts> user laboproba
<jbowes> smarts: can you give me the url for dev 1?
<smarts> jbowes, sure
<smarts> candlepin1.devlab.phx1.redhat.com

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


How reproducible:

Every Time.
Steps to Reproduce:
1. Hit candlepin1.devlab.phx1.redhat.com with user laboproba
2. as OwnerInfo for consumerTypeCountByPool
3.
  
Actual results:

It should be 0 for all, but systme show 2. Owner shows blank pools, so should OwnerInfo

Expected results:


Additional info:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 James Bowes 2011-06-03 16:35:56 UTC
ownerinfo was displaying details for all pools, regardless of their start and end date. I'm changing it to skip over pools that have a start date after now, or an end date before now.

Comment 3 James Bowes 2011-06-03 17:34:45 UTC
fixed in 0.3 - 87085df8b17433ecdec09b781b5a9fb5367d38b2
and master - e489c9a2848d94ed5e94492ef929095fb35ea4ae

Comment 4 Tyler Smart 2011-08-01 18:34:04 UTC
Good to go.

this is fixed. (has been for a while)

Comment 5 John Sefler 2011-08-01 18:59:53 UTC
Here's little more verification to support comment 4 and based on comment 2

Verifying Version with TESTDATA=1 deployed...
[root@jsefler-onprem-62candlepin proxy]# git show-ref | grep master
0a6ef47c330b8cca18feeb92667db6ee30f3a65e refs/heads/master
0a6ef47c330b8cca18feeb92667db6ee30f3a65e refs/remotes/origin/master



Today's date is...

[jsefler@jsefler ~]$ date
Mon Aug  1 14:46:46 EDT 2011

All of the pools returned for owner admin...

[jsefler@jsefler ~]$ curl -u admin:admin -k https://jsefler-onprem-62candlepin.usersys.redhat.com:8443/candlepin/owners/admin/pools | python -mjson.tool | egrep "startDate"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  178k    0  178k    0     0   164k      0 --:--:--  0:00:01 --:--:--  236k
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-07-31T00:00:00.000+0000", 
        "startDate": "2011-06-30T04:00:00.000+0000", 

^^^^ started before today, and ...

[jsefler@jsefler ~]$ curl -u admin:admin -k https://jsefler-onprem-62candlepin.usersys.redhat.com:8443/candlepin/owners/admin/pools | python -mjson.tool | egrep "endDate"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  178k    0  178k    0     0   203k      0 --:--:-- --:--:-- --:--:--  292k
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 
        "endDate": "2012-07-30T00:00:00.000+0000", 

^^^ end in the future.

By specifying a future activeon date of 2013-01-01, all of the pools returned for owner admin...

[jsefler@jsefler ~]$ curl -u admin:admin -k https://jsefler-onprem-62candlepin.usersys.redhat.com:8443/candlepin/owners/admin/pools?activeon=2013-01-01 | python -mjson.tool | egrep "startDate"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 91557    0 91557    0     0  89376      0 --:--:--  0:00:01 --:--:--  129k
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 
        "startDate": "2012-07-20T00:00:00.000+0000", 

^^^ will start in the future and therefore were excluded in the pools listing that defaults to activeon today.

moving to VERIFIED

Comment 6 Bryan Kearney 2012-07-17 13:03:53 UTC
Marking all community bugs modified or beyong as closed.