Bug 973930 - [broker_50] oo-admin-chk should not report FAIL if there's no record in usage_records for untracked additional storage
[broker_50] oo-admin-chk should not report FAIL if there's no record in usage...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Pod (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 03:09 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:04 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 03:09:39 EDT
Description of problem:
If trying to run oo-admin-chk with account have untracked additional storage in gears, for eg: 5G additional storage in gears, it will report FAIL that

Found addtl storage for gear Id '51b938f3c9c6fe945b000021' but could not find corresponding usage record.
Found addtl storage for gear Id '51b939f9c9c6fe945b000045' but could not find corresponding usage record.

But it seems it's by design that untracked additional storage will not be recorded in usage_records

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

How reproducible:
Always


Steps to Reproduce:
1.Upgrade user to silver or set un_tracked additional storage to 6G via oo-admin-ctl-userr

2. Create an app for this user and add less than maxuntrackedstorage to the cartridge
#rhc cartridge-storage jbosseap-6.0 -a  sjbosseapapp2 --add  5G

3. Check usage_records for the additional storage records
db.usage_records.find({app_name:"sjbosseapapp2",usage_type: "ADDTL_FS_GB"},{event:1, usage_type:2})

4. Run oo-admin-chk -l 2 --verbose


Actual results:
oo-admin-chk -l 2 is checking the untracked storage records as well:
Found addtl storage for gear Id '51b938f3c9c6fe945b000021' but could not find corresponding usage record.
Found addtl storage for gear Id '51b939f9c9c6fe945b000045' but could not find corresponding usage record.


Expected results:
It should only check the tracked storage records


Additional info:
Comment 1 Ravi Sankar 2013-06-14 01:00:44 EDT
Fixed in devenv_3360.
Comment 2 zhaozhanqi 2013-06-14 03:58:22 EDT
Tested this issue on devenv_3360, it has been fixed.

1.Upgrade user to silver or set un_tracked additional storage to 6G via oo-admin-ctl-userr

2. Create an app for this user and add less than maxuntrackedstorage to the cartridge
#rhc cartridge-storage jbosseap-6.0 -a  sjbosseapapp2 --add  5G
3. run oo-admin-chk -l 1 --verbose


[root@ip-10-196-79-9 openshift]# oo-admin-chk -l 1 --verbose
Started at: 2013-06-14 03:56:33 -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.449s
Total gears found on the nodes: 1
Total nodes that responded : 1
Time to get all sshkeys for all gears from nodes: 20.058s
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: 42.973s
Finished at: 2013-06-14 03:57:16 -0400

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