Description of problem: Given 10G maxtrackedstorage is added to an account, when I added 15G additional storage to a gear, the value of additional_filesystem_gb in 'applications' collection is stored as 15, while the values of 'addtl_fs_gb' in 'usage_records' and 'usage' collections are stored as 10. This makes oo-admin-chk fails validation. Version-Release number of selected component (if applicable): On devenv_3836 How reproducible: Always Steps to Reproduce: 1. Grand 10 maxtrackedstorage to current account oo-admin-ctl-user -l $user --setmaxtrackedstorage 10 2. Create an application, add 15G storage(default 5G storage for silver plan + granted 10G storage) 3. oo-admin-chk -l 1 Actual results: After step 3: Check failed. Found addtl storage mismatch for gear Id '5245220f4a8a1a0f380000f2', 10 in usage record vs 15 for corresponding gear in the application. Please refer to the oo-admin-repair tool to resolve some of these inconsistencies. Checking applications: ip-10-238-166-43(mongod-2.4.6)[PRIMARY] openshift_broker_dev> db.applications.find({"name":"r19s"},{name:1, group_overrides:1}) { "_id": ObjectId("5245220f4a8a1a0f380000f2"), "group_overrides": [ { "components": [ { "cart": "ruby-1.9", "comp": "ruby-1.9" } ], "min_gears": 1, "additional_filesystem_gb": 15, "max_gears": 1 } ], "name": "r19s" } ip-10-238-166-43(mongod-2.4.6)[PRIMARY] openshift_broker_dev> db.usage_records.find({"app_name":"r19s"},{addtl_fs_gb:1}) { "_id": ObjectId("5245222c4a8a1a0f38000111"), "event": "begin", "time": ISODate("2013-09-27T02:14:04.633-0400"), "created_at": ISODate("2013-09-27T02:14:04.633-0400"), "gear_id": ObjectId("5245220f4a8a1a0f380000f2"), "usage_type": "ADDTL_FS_GB", "user_id": ObjectId("5244e92d4a8a1af7ab000001"), "app_name": "r19s", "addtl_fs_gb": 10, "updated_at": ISODate("2013-09-27T02:14:04.637-0400") } The additionl gear storage stored in above 2 collections are different Expected results: Should store the same value and oo-admin-chk should pass validation Additional info:
Fixed in https://github.com/openshift/origin-server/pull/3733 Fixed oo-admin-chk script.For the example in the description, Additional gear storage in applications collection will be 15 and in usage_records collection will be 10. We capture only tracked additional storage (in this case 5GB untracked storage is discounted).
Commits pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/11951af13a744194000890575e31a90ddd2991fa Bug 1012782 - oo-admin-chk fix https://github.com/openshift/origin-server/commit/b0c28b5d74f593412afb86dcb8f266eabb20942f Merge pull request #3733 from pravisankar/dev/ravi/bug1012782 Merged by openshift-bot
Verified on devenv_3844, untracked gear storage will not be counted in by oo-admin-chk. Verification steps are as description.