Bug 997352 - oo-admin-chk cannot find out the inconsistent between usage collection and usage_record collection in mongodb
oo-admin-chk cannot find out the inconsistent between usage collection and us...
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-08-15 04:59 EDT by Meng Bo
Modified: 2015-05-14 20:19 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-29 08:51:29 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 Meng Bo 2013-08-15 04:59:19 EDT
Description of problem:
Create app, and remove the app entry from usage collection in mongodb. Use oo-admin-chk to check the usage issue.

It will report success and cannot find out the problem.

# oo-admin-chk -l1 -v
Checking un-ended records in usage_records collection but not in usage collection and viceversa: OK


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

How reproducible:
always

Steps to Reproduce:
1.Create app
2.Remove the usage of this app from mongodb
#mongo openshift_broker_dev
> db.usage.remove({"app_name":"$appname"})

3.Use oo-admin-chk to check the usage issue

Actual results:
# oo-admin-chk -l1 -v
Checking un-ended records in usage_records collection but not in usage collection and viceversa: OK

Expected results:
Found #{usage_record_unended_events-usage_unended_events} un-ended records in usage_records collection for gear Id '#{gear_id}' but could not find corresponding records in usage

Additional info:
billing is enabled

# irb
irb(main):002:0> require "/var/www/openshift/broker/config/environment"
=> true
irb(main):003:0> Rails.configuration.respond_to?('billing')
=> true
Comment 1 Ravi Sankar 2013-08-19 21:02:35 EDT
Fixed in https://github.com/openshift/origin-server/pull/3421
Comment 2 openshift-github-bot 2013-08-20 02:05:14 EDT
Commits pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/f7781425fb61fa0f80f59d34df8f462e9f5a439f
Bug 997352 - Added usage_record -> usage inconsistency checks

https://github.com/openshift/origin-server/commit/3d448f5ddb1f22e0e3a236dc933b38ebbc74ec0e
Merge pull request #3421 from pravisankar/dev/ravi/bug997352

Merged by openshift-bot
Comment 3 Meng Bo 2013-08-20 06:47:13 EDT
Checking un-ended records in usage_records collection but not in usage collection and viceversa: FAIL
Re-checking for gear '521341369f776ebba900001a'...	FAIL
Re-checking for gear '521342039f776ebba900003d'...	FAIL
Re-checking for gear '5213428e9f776eff0d000002'...	FAIL
Re-checking for gear '521343419f776eff0d000018'...	FAIL
Check failed.
Found usage record for gear Id '521343419f776eff0d000018' but could not find corresponding gear in the application.
Found 1 un-ended records in usage_records collection for gear Id '521341369f776ebba900001a' but could not find corresponding records in usage.
Found 1 un-ended records in usage_records collection for gear Id '521342039f776ebba900003d' but could not find corresponding records in usage.
Found 1 un-ended records in usage_records collection for gear Id '5213428e9f776eff0d000002' but could not find corresponding records in usage.
Found 1 un-ended records in usage_records collection for gear Id '521343419f776eff0d000018' but could not find corresponding records in usage.
Please refer to the oo-admin-repair tool to resolve some of these inconsistencies.
Total time: 40.711s
Finished at: 2013-08-20 06:41:27 -0400


Issue fixed on devenv_3678, move bug to verified.

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