Bug 974056 - [broker_50] oo-admin-chk should not report FAIL if user has just downgraded from Silver to Free while aria has not been changed to free until the end of the month
[broker_50] oo-admin-chk should not report FAIL if user has just downgraded ...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Kubernetes (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Ravi Sankar
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-13 07:08 EDT by Xiaoli Tian
Modified: 2015-05-14 20:17 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-24 10:54:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Xiaoli Tian 2013-06-13 07:08:46 EDT
Description of problem:
After downgrading an user from Silver to Free,  plan_id in mongo has been changed to Free: 
libra_rs:PRIMARY> db.cloud_users.find ({login: "xtian+bt2@redhat.com"},  {plan_id: 1, plan_state: 2, usage_account_id: 3})
{ "_id" : ObjectId("51b93788c9c6fe945b000006"), "plan_id" : "free", "plan_state" : "ACTIVE", "usage_account_id" : "2555487" }

But in Aria, the plan_id will be still siver and not be changed to free until the end of current month ( which should be by design as far as I know).

While running oo-admin-chk -l 2 --verbose, it will report it as FAIL since the plan_id is not match between mongo and aria

Checking plan_id validity for all billing users: FAIL
User '51b93788c9c6fe945b000006' has plan_id 'free' in mongo but has plan_id 'silver' in Aria billing provider.

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

How reproducible:
Always

Steps to Reproduce:
1. Create an account and upgrade it to silver via web console
2. Downgrade it to Free before the end of current month via web console
3. run oo-admin-chk -l 2 --verbose

Actual results:
It will report it as FAIL since the plan_id is not match between mongo and aria
Checking plan_id validity for all billing users: FAIL
User '51b93788c9c6fe945b000006' has plan_id 'free' in mongo but has plan_id 'silver' in Aria billing provider.

Expected results:
It should bypass such mismatch or checking the next pending queue in aria 

Additional info:
Comment 1 Ravi Sankar 2013-06-14 00:58:46 EDT
Fixed in devenv_3360.
Comment 2 zhaozhanqi 2013-06-14 04:07:33 EDT
Tested it on devenv_3360, it has been fixed


Steps to Reproduce:
1. Create an account and upgrade it to silver via web console
2. Downgrade it to Free before the end of current month via web console
3. run oo-admin-chk -l 2 --verbose


[root@ip-10-196-79-9 openshift]# oo-admin-chk -l 1 --verbose
Started at: 2013-06-14 04:06:14 -0400
Time to fetch mongo data: 0.025s
Total gears found in mongo: 1
Checking consumed gear count for user user_with_multiple_gear_sizes@test.com...	OK
Checking consumed gear count for user user_with_extra_storage@test.com...	OK
Checking consumed gear count for user user_with_certificate_capabilities@test.com...	OK
Checking consumed gear count for user zzhao@redhat.com...	OK
Time to get all gears from nodes: 20.445s
Total gears found on the nodes: 1
Total nodes that responded : 1
Time to get all sshkeys for all gears from nodes: 20.053s
Total gears found on the nodes: 1
Total nodes that responded : 1
Checking application gears and ssh keys on corresponding nodes:
100310887277097123840000 : String...	OK
Checking ssh keys for gear: 100310887277097123840000...	OK
Checking node gears in application database:
100310887277097123840000...	OK
Checking for application without any group instances in the database:
Checking for application without any gears in the group instances in the database:
Checking for users with nil or empty or missing login in the database:
Checking for unreserved UIDs in the district:
Checking for unused UIDs in the district:
Checking for gears with the same UID:
Checking gears available in applications collection but not in usage_records and viceversa: OK
Checking gears with additional storage in applications collection but not in usage_records and viceversa: OK
Checking gears with premium cartridge in applications collection but not in usage_records and viceversa: OK
Checking un-ended records in usage_records collection but not in usage collection and viceversa: OK
Checking usage_account_id validity for all billing users: OK
Checking plan_id validity for all billing users: OK
Checking plan_state validity for all billing users: OK
Success
Total time: 46.323s
Finished at: 2013-06-14 04:07:00 -0400

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