Commit graph

456 commits

Author SHA1 Message Date
Scott Schneider
798aa3f9ff Ensure 'lifetime' val returned by GET /vm/:hostname is an int 2015-04-09 12:48:56 -07:00
Scott Schneider
818b92100b running-to-lifetime comparison should be 'greater than or equal to' 2015-04-09 12:35:13 -07:00
Colin
6cd56f40ee Merge pull request #89 from sschneid/remove_janitor_expire_via_redis
Auto-expire Redis metadata key via Redis EXPIRE
2015-04-07 15:57:17 -07:00
Scott Schneider
4878799374 Merge pull request #88 from colinPL/qeng_1906_sinatra
(QENG-1906) Add specs for Dashboard and root API class
2015-04-07 11:15:14 -07:00
Scott Schneider
f9de28236b Auto-expire Redis metadata key via Redis EXPIRE
This commit also removed the unnecessary Vmpooler::Janitor lib
2015-04-07 11:01:37 -07:00
Scott Schneider
2b9f66b8d2 Merge pull request #86 from colinPL/qeng_1906_poolmanager
(QENG-1906) Break apart check_pending_vm and add spec tests
2015-04-06 16:24:03 -07:00
Colin
97879339b5 (QENG-1906) Add specs for Dashboard and root API class
Add spec tests for Sinatra powered Dashboard piece. This includes tests
for the homepage (/) and a nonexistent route.
2015-04-02 13:39:11 -07:00
Roger Ignazio
4e65d49020 Merge pull request #87 from colinPL/api_redis_fix
(maint) Fix bad redis reference
2015-04-02 11:42:47 -07:00
Colin
a5edb9bae2 (maint) Fix bad redis reference
This fixes a redis reference that was missed in a previous refactor.
2015-04-02 11:30:43 -07:00
Colin
e6ee6b1257 (QENG-1906) Break apart check_pending_vm and add spec tests
This commit breaks apart the method check_pending_vm in to three,
smaller methods that are easier to test. There are no functionality
changes or bug fixes.

This adds spec tests for the overall functionality that was
check_pending_vm.
2015-04-01 15:42:28 -07:00
Scott Schneider
6758da7f5c Merge pull request #85 from colinPL/graphite_fix
Remove defined? when checking configuration for graphite server.
2015-04-01 09:39:37 -07:00
Colin
0316ddbc4a Remove defined? when checking configuration for graphite server. 2015-04-01 09:38:04 -07:00
Scott Schneider
8facda429e Merge pull request #78 from colinPL/qeng_1906_janitor
(QENG-1906) Add spec tests for Janitor
2015-03-31 15:12:26 -07:00
Colin
d0275f5fba (QENG-1906) Add spec tests for Janitor
Add spec tests to verify Janitor deletes stale vms correctly. This
required a small refactor of Janitor to move the logic out of the for
loop.
2015-03-31 10:21:24 -07:00
Scott Schneider
fd90756b83 Merge pull request #77 from colinPL/qeng_1906
(QENG-1906) Refactor initialize to allow config passing
2015-03-31 10:10:42 -07:00
Colin
1408f35867 (QENG-1906) Refactor initialize to allow config passing
Prior to this commit, several pieces of vmpooler performed configuration
and initialization steps within 'initialize'. This made it difficult to
pass in mock objects for testing purposes.

This commit performs a single configuration and passes the results to
the various pieces of vmpooler.
2015-03-30 14:23:06 -07:00
Colin
34fd054a48 Merge pull request #75 from sschneid/query_destroyed_vms
Use 'checkout' time to calculate 'running' time
2015-03-25 13:52:15 -07:00
Scott Schneider
858d4c7541 Use 'checkout' time to calculate 'running' time 2015-03-25 13:41:26 -07:00
Colin
91563c0408 Merge pull request #71 from sschneid/historic_redis_vm_metadata
(QENG-2057) Historic Redis VM metadata
2015-03-25 12:48:56 -07:00
Colin
5a7b3c45de Merge pull request #73 from sschneid/vm_tagging
Catch improperly-formatted data payloads
2015-03-20 13:06:53 -07:00
Scott Schneider
10db0c4c6a Catch improperly-formatted data payloads 2015-03-20 13:03:29 -07:00
Colin
32ead5f43a Merge pull request #72 from sschneid/vm_tagging
(QENG-1905) Adding VM-tagging support via PUT /vm/:hostname endpoint
2015-03-20 13:01:52 -07:00
Scott Schneider
d48d487de0 Validate data payload before operating on it 2015-03-20 12:52:17 -07:00
Scott Schneider
7b97e58e0f Clean up Redis VM objects after redis['data_ttl'] 2015-03-20 10:25:51 -07:00
Scott Schneider
48a9ef0dfd Store checkout and destroy timestamps 2015-03-20 09:57:47 -07:00
Scott Schneider
99a18c781a Adding VM-tagging support via PUT /vm/:hostname endpoint 2015-03-19 11:27:39 -07:00
Scott Schneider
1b8435a63a Merge pull request #67 from colinPL/readme_summary
(QENG-1899) Add documentation for /summary
2015-03-11 13:22:05 -07:00
Colin
0f12cc2716 (QENG-1899) Add documentation for /summary
Add documentation to the README file for the /summary end point,
including how to call with and without parameters as well as the
resulting JSON responses.
2015-03-11 13:09:46 -07:00
Roger Ignazio
fa4147fb68 Merge pull request #66 from sschneid/hgetall_not_hget_in_a_loop
Use $redis.hgetall rather than hget in a loop
2015-03-09 11:43:19 -07:00
Scott Schneider
558c70ab0d Use $redis.hgetall rather than hget in a loop
This cuts down on render-time for the /api/v1/summary endpoint drastically.
2015-03-09 11:12:39 -07:00
Colin
6409dedd3e Merge pull request #65 from sschneid/per_pool_summary_metrics
/summary per-pool metrics
2015-03-06 14:49:19 -08:00
Scott Schneider
d1e4acbd55 /summary per-pool metrics
This commit also consolidates the 'get_boot_metrics' and
'get_clone_metrics' methods into a single parameterized
'get_task_metrics' method.
2015-03-06 14:40:39 -08:00
Scott Schneider
e83b3e47af (maint) fix typo 2015-03-04 20:03:16 -08:00
Colin
89ee786908 Merge pull request #64 from sschneid/boot_metrics
Show boot metrics in /status and /summary endpoints
2015-03-04 16:09:45 -08:00
Scott Schneider
c86f680a41 Show boot metrics in /status and /summary endpoints 2015-03-04 16:06:42 -08:00
Colin
1fa2da575a Merge pull request #61 from sschneid/more_granular_metrics
More granular metrics
2015-03-04 16:02:38 -08:00
Scott Schneider
18703efd60 Guard against nil VM clone time 2015-03-04 13:06:49 -08:00
Colin
5454352039 Merge pull request #63 from sschneid/syntax_spacing
(maint) Fixing spacing
2015-03-04 11:38:01 -08:00
Scott Schneider
7f8d4111ef (maint) Fixing spacing 2015-03-04 11:36:37 -08:00
Colin
c4b3dda2f5 Merge pull request #62 from sschneid/metric_calc_via_helper
Metric calc via helpers
2015-03-04 11:31:52 -08:00
Scott Schneider
e347e2b6b4 Don't include daily_clone durations in average if nothing was cloned 2015-03-04 11:28:31 -08:00
Scott Schneider
35e78aacb5 Use 'date_str' instead of 'date' 2015-03-04 11:12:23 -08:00
Scott Schneider
5453ec6206 Use new helper methods in /summary route 2015-03-04 10:28:19 -08:00
Scott Schneider
201897214b Move clone metric-gathering to 'get_clone_metrics' helper 2015-03-04 09:58:11 -08:00
Scott Schneider
1397ff93c1 Move capacity metric-gathering to 'get_capacity_metrics' helper 2015-03-04 09:49:16 -08:00
Scott Schneider
fd0e5cb438 Move queue metric-gathering to 'get_queue_metrics' helper 2015-03-04 09:41:10 -08:00
Scott Schneider
0c3f84e072 Slight rework of data param validation 2015-03-04 09:31:56 -08:00
Scott Schneider
c1099a8273 Add 'get_clone_times' helper 2015-03-04 09:21:06 -08:00
Scott Schneider
4f880497b7 Alphabetize existing helpers 2015-03-04 09:15:04 -08:00
Scott Schneider
ba01b60541 Store template (pool) name with hostname in Redis metric keys 2015-03-03 15:21:06 -08:00