Bug 974326 - [broker_50] oo-admin-chk should recognize missing usage_account_id field for silver_plan account
[broker_50] oo-admin-chk should recognize missing usage_account_id field for...
Status: CLOSED WONTFIX
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Abhishek Gupta
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-13 21:17 EDT by Xiaoli Tian
Modified: 2015-05-14 20:18 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-14 01:22: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 21:17:07 EDT
Description of problem:
After upgrading an user to silver and remove the usage_account_id from cloud_users collections to simulate missing usage_account_id field situation,

And run oo-admin-chk -l 2 --verbose.

oo-admin-chk does not check this point and give it a PASS


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
2. Check it's usage_account_id and remove this field from mongo
libra_rs:PRIMARY> db.cloud_users.find ({login: "xtian+bt1@redhat.com"},  {plan_id: 1, plan_state: 2, usage_account_id: 3})
{ "_id" : ObjectId("51b935b2c9c6fe945b000001"), "plan_id" : "silver", "plan_state" : "ACTIVE", "usage_account_id" : "2555331" }

libra_rs:PRIMARY> db.cloud_users.update({login: "xtian+bt1@redhat.com"}, {$unset: {usage_account_id : ""}})

libra_rs:PRIMARY> db.cloud_users.find ({login: "xtian+bt1@redhat.com"},  {plan_id: 1, plan_state: 2, usage_account_id: 3})
{ "_id" : ObjectId("51b935b2c9c6fe945b000001"), "plan_id" : "silver", "plan_state" : "ACTIVE" }


3. run oo-admin-chk -l 2 --verbose

Actual results:
It did not recognize the missing field


Expected results:
It should  check the missing fields as well.

Additional info:
Comment 1 Ravi Sankar 2013-06-14 01:22:38 EDT
We do not expect usage_account_id to be missing from cloud_users collection. Even if that happens (could not think of any situation), we don't want to introduce that check in oo-admin-chk, it's a very expensive operation and not worth it.

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