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:
https://github.com/openshift/rhc/pull/437 Addresses this.
That is to say, https://github.com/openshift/li/pull/1825 addresses this. Pasted the wrong link.
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
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") }
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") }