Bug 997864 - No premium cartridge usage recorded in usage_records& usage for jbosseap-6
No premium cartridge usage recorded in usage_records& usage for jbosseap-6
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Kubernetes (Show other bugs)
2.x
Unspecified Linux
unspecified Severity medium
: ---
: ---
Assigned To: Abhishek Gupta
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-16 06:12 EDT by Lei Zhang
Modified: 2015-05-14 20:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-29 08:52:22 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 Lei Zhang 2013-08-16 06:12:53 EDT
Description of problem:
Given a jbosseap6 app created(e.g., myjbosseap6s1), ssh into instance and use username to check usage_record collection, found just 1 record created 

[root@ip-10-76-209-123 ~]# mongo
MongoDB shell version: 2.2.3
connecting to: test
libra_rs:PRIMARY> use openshift_broker_dev
switched to db openshift_broker_dev
libra_rs:PRIMARY> db.usage_records.find({"user_id":ObjectId("520ddd25ca587a3543000118")});
{ "_id" : ObjectId("520de273ca587a35430001a6"), "event" : "begin", "time" : ISODate("2013-08-16T08:27:31.391Z"), "created_at" : ISODate("2013-08-16T08:27:31.391Z"), "gear_id" : ObjectId("520de26fca587a354300018c"), "usage_type" : "GEAR_USAGE", "user_id" : ObjectId("520ddd25ca587a3543000118"), "app_name" : "myjbosseap6s1", "gear_size" : "small", "updated_at" : ISODate("2013-08-16T08:27:31.397Z") }

Version-Release number of selected component (if applicable):
devenv_3660
rhc-1.13.1.gem


How reproducible:
always

Steps to Reproduce:
1.create one jbosseap6  app
#rhc app create myjbosseap6s1 jbosseap-6 -s
2.ssh into instance and use username to check usage_record collection and usage collection

Actual results:
Just 1 record created in usage_record collection when jbosseap scalable app created

Expected results:
There should be 2 create record in usage_record collection, one for gear, another for premium cartridge, both with 'begin' event

Additional info:
Comment 1 John W. Lamb 2013-08-16 16:28:31 EDT
https://github.com/openshift/rhc/pull/437 Addresses this.
Comment 2 John W. Lamb 2013-08-16 16:34:39 EDT
That is to say, https://github.com/openshift/li/pull/1825 addresses this. Pasted the wrong link.
Comment 3 openshift-github-bot 2013-08-16 23:01:09 EDT
Commit pushed to master at https://github.com/openshift/li

https://github.com/openshift/li/commit/4dbf6453d2f8c2da46fe9cebdce2dbe50d878ae1
<cartridge versions> Bug 997864, fix up references to renamed carts
https://trello.com/c/evcTYKdn/219-3-adjust-out-of-date-cartridge-versions

Basic search and replace
Comment 4 Lei Zhang 2013-08-18 23:29:07 EDT
retest on devenv_3672, the bug cann't be reproduced.

libra_rs:PRIMARY> db.usage.find({"app_name" : "myjbosseap6s1"})
{ "_id" : ObjectId("5211908e3074f643e300027c"), "user_id" : ObjectId("52118d323074f65cbb000004"), "app_name" : "myjbosseap6s1", "gear_id" : ObjectId("5211908e3074f643e3000264"), "begin_time" : ISODate("2013-08-19T03:27:10.854Z"), "created_at" : ISODate("2013-08-19T03:27:10.854Z"), "usage_type" : "PREMIUM_CART", "cart_name" : "jbosseap-6", "updated_at" : ISODate("2013-08-19T03:27:10.855Z") }
{ "_id" : ObjectId("521190923074f643e3000280"), "user_id" : ObjectId("52118d323074f65cbb000004"), "app_name" : "myjbosseap6s1", "gear_id" : ObjectId("5211908e3074f643e3000264"), "begin_time" : ISODate("2013-08-19T03:27:14.791Z"), "created_at" : ISODate("2013-08-19T03:27:14.791Z"), "usage_type" : "GEAR_USAGE", "gear_size" : "small", "updated_at" : ISODate("2013-08-19T03:27:14.793Z") }


libra_rs:PRIMARY> db.usage_records.find({"app_name" : "myjbosseap6s1"})
{ "_id" : ObjectId("5211908e3074f643e300027d"), "event" : "begin", "time" : ISODate("2013-08-19T03:27:10.854Z"), "created_at" : ISODate("2013-08-19T03:27:10.854Z"), "gear_id" : ObjectId("5211908e3074f643e3000264"), "usage_type" : "PREMIUM_CART", "user_id" : ObjectId("52118d323074f65cbb000004"), "app_name" : "myjbosseap6s1", "cart_name" : "jbosseap-6", "updated_at" : ISODate("2013-08-19T03:27:10.858Z") }
{ "_id" : ObjectId("521190923074f643e3000281"), "event" : "begin", "time" : ISODate("2013-08-19T03:27:14.791Z"), "created_at" : ISODate("2013-08-19T03:27:14.791Z"), "gear_id" : ObjectId("5211908e3074f643e3000264"), "usage_type" : "GEAR_USAGE", "user_id" : ObjectId("52118d323074f65cbb000004"), "app_name" : "myjbosseap6s1", "gear_size" : "small", "updated_at" : ISODate("2013-08-19T03:27:14.796Z") }
Comment 5 Lei Zhang 2013-08-19 21:56:28 EDT
Verified on devenv_3675.

libra_rs:PRIMARY> db.usage.find({"app_name" : "myjbosseap6s1"});
{ "_id" : ObjectId("5212cb425be3a1effa00003d"), "user_id" : ObjectId("5212c7335be3a1effa000001"), "app_name" : "myjbosseap6s1", "gear_id" : ObjectId("5212cb425be3a1effa000025"), "begin_time" : ISODate("2013-08-20T01:49:54.987Z"), "created_at" : ISODate("2013-08-20T01:49:54.987Z"), "usage_type" : "PREMIUM_CART", "cart_name" : "jbosseap-6", "updated_at" : ISODate("2013-08-20T01:49:54.988Z") }
{ "_id" : ObjectId("5212cb465be3a1effa000041"), "user_id" : ObjectId("5212c7335be3a1effa000001"), "app_name" : "myjbosseap6s1", "gear_id" : ObjectId("5212cb425be3a1effa000025"), "begin_time" : ISODate("2013-08-20T01:49:58.699Z"), "created_at" : ISODate("2013-08-20T01:49:58.699Z"), "usage_type" : "GEAR_USAGE", "gear_size" : "small", "updated_at" : ISODate("2013-08-20T01:49:58.700Z") }

libra_rs:PRIMARY> db.usage_records.find({"app_name" : "myjbosseap6s1"});
{ "_id" : ObjectId("5212cb425be3a1effa00003e"), "event" : "begin", "time" : ISODate("2013-08-20T01:49:54.987Z"), "created_at" : ISODate("2013-08-20T01:49:54.987Z"), "gear_id" : ObjectId("5212cb425be3a1effa000025"), "usage_type" : "PREMIUM_CART", "user_id" : ObjectId("5212c7335be3a1effa000001"), "app_name" : "myjbosseap6s1", "cart_name" : "jbosseap-6", "updated_at" : ISODate("2013-08-20T01:49:54.990Z") }
{ "_id" : ObjectId("5212cb465be3a1effa000042"), "event" : "begin", "time" : ISODate("2013-08-20T01:49:58.699Z"), "created_at" : ISODate("2013-08-20T01:49:58.699Z"), "gear_id" : ObjectId("5212cb425be3a1effa000025"), "usage_type" : "GEAR_USAGE", "user_id" : ObjectId("5212c7335be3a1effa000001"), "app_name" : "myjbosseap6s1", "gear_size" : "small", "updated_at" : ISODate("2013-08-20T01:49:58.703Z") }

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