Commit graph

1044 commits

Author SHA1 Message Date
Samuel Beaulieu
f825a410f8 (POOLER-166) Check for stale dns records 2020-05-29 10:01:02 -05:00
Samuel Beaulieu
46af69f67b Merge branch 'pooler_158' of github.com:mattkirby/vmpooler into pooler_158 2020-05-27 10:31:17 -05:00
kirby@puppetlabs.com
da72159f96 Duplicate capabilities from vm/:template to ondemandvm/:template for supporting vmfloaty 2020-05-26 18:02:20 -07:00
kirby@puppetlabs.com
b831faf5c0 Check each ondemand request to see if it is ready when moving an instance to ready
This commit updates how ondemand requests are checked to include a check to see if the request is ready when an instance is added to the ready instances set. Without this change the delay between a check for the instances being ready and the last instance becoming availalbe could cause the API to show all instances are ready, but the request not be considered ready yet.
2020-05-21 14:16:48 -07:00
kirby@puppetlabs.com
cb37d3b067 Bail reporting an error before attempting to clone when required parameter is missing
This commit updates clone_vm in the vsphere provider to raise an error when a target folder can not be found. Without this change, if the target folder can not be found a clone is attempted anyway, resulting in an error and backtrace.
2020-05-21 10:17:48 -07:00
kirby@puppetlabs.com
9634a724e5 Add auth error codes to ondemandvm endpoints requiring auth 2020-05-20 09:46:01 -07:00
Samuel Beaulieu
5a4093508c Merge branch 'pooler_158' of github.com:mattkirby/vmpooler into pooler_158 2020-05-19 12:33:36 -05:00
kirby@puppetlabs.com
86e92de4cf (POOLER-158) Add capability to provision VMs on demand
This change adds a capability to vmpooler to provision instances on
demand. Without this change vmpooler only supports retrieving machines
from pre-provisioned pools.

Additionally, this change refactors redis interactions to reduce round
trips to redis. Specifically, multi and pipelined redis commands are
added where possible to reduce the number of times we are calling redis.

To support the redis refactor the redis interaction has changed to
leveraging a connection pool. In addition to offering multiple
connections for pool manager to use, the redis interactions in pool
manager are now thread safe.

Ready TTL is now a global parameter that can be set as a default for all
pools. A default of 0 has been removed, because this is an unreasonable
default behavior, which would leave a provisioned instance in the pool
indefinitely.

Pool empty messages have been removed when the pool size is set to 0.
Without this change, when a pool was set to a size of 0 the API and pool
manager would both show that a pool is empty.
2020-05-15 14:12:36 -07:00
kirby@puppetlabs.com
a015fd87dc Do not show a pool as empty in status API when the configured size is 0 2020-05-13 09:21:56 -07:00
kirby@puppetlabs.com
f596a989a5 Remove unnecessary checking for syncing pool config data in api 2020-05-12 11:57:55 -07:00
kirby@puppetlabs.com
75b966e9d4 Add a variable that makes a little more clear the intent of excluding request_id from payload in generate_ondemand_request 2020-05-12 11:47:45 -07:00
kirby@puppetlabs.com
8ffcafdc99 Ensure domain is included in the reply for post and get ondemandvm when configured 2020-05-12 11:32:53 -07:00
kirby@puppetlabs.com
dddbeba4a6 Identify when a cloned VM is being checked for ready for a request that has been deleted 2020-05-12 09:40:47 -07:00
kirby@puppetlabs.com
cebb118655 Remove providers.yaml used for local testing 2020-05-12 09:09:18 -07:00
kirby@puppetlabs.com
d936e20747 Add documentation for new parameters to env config and file based config docs 2020-05-12 08:38:14 -07:00
kirby@puppetlabs.com
141e972526 Update vmpooler README and API documentation 2020-05-11 21:25:53 -07:00
kirby@puppetlabs.com
8459e2ec21 Move to using redis to track the ondemand clone task count so it can be displayed by dashboard and API 2020-05-11 18:22:54 -07:00
kirby@puppetlabs.com
4de3490bfe Add test cases for when ondemandvm GET is run and the request has been deleted, or marked as failed. 2020-05-11 17:46:09 -07:00
kirby@puppetlabs.com
ea4322799b Ensure get ondemandvm shows when a request has been deleted 2020-05-11 17:12:46 -07:00
kirby@puppetlabs.com
18ca38b8db Remove pool empty messages for pools with a size of 0 configured 2020-05-11 16:47:30 -07:00
kirby@puppetlabs.com
590c9a4c14 Add capability to delete a request by ID 2020-05-11 16:37:34 -07:00
kirby@puppetlabs.com
0e798c391d Add a configurable maximum per pool request upper limit 2020-05-11 13:13:03 -07:00
kirby@puppetlabs.com
9ea80f2a10 Add capability to specify max lifetime via environment variable 2020-05-08 15:43:59 -07:00
kirby@puppetlabs.com
203cadf1ed Add auth from ondemand request to provisioned vms 2020-05-08 15:43:35 -07:00
kirby@puppetlabs.com
74fbc74c4d Update clone_vm so the redis connection is released during the VM clone. 2020-05-08 15:04:59 -07:00
kirby@puppetlabs.com
e4062dc005 Remove unreasonable ttl of 0 concept for a ready vm 2020-05-08 14:39:25 -07:00
kirby@puppetlabs.com
b1d4f0971c Expire ondemand requests and remove associated instances when ondemand_request_ttl has been exceeded for a given request 2020-05-07 21:38:42 -07:00
kirby@puppetlabs.com
9538c0b3e3 Address rubocop offenses 2020-05-07 15:19:44 -07:00
kirby@puppetlabs.com
86f6848ef0 Undo redis new_redis rename. Update vmpooler version in dockerfile. 2020-05-07 09:06:47 -07:00
kirby@puppetlabs.com
ef40f2610b Remove request_id from fail_pending_vm 2020-05-07 09:01:21 -07:00
kirby@puppetlabs.com
3f1a2a2dc4 Remove debug statements and fix additional config_spec tests 2020-05-07 02:00:34 -07:00
kirby@puppetlabs.com
c29ce0d56e Add remaining tests for new functionality 2020-05-07 01:57:38 -07:00
kirby@puppetlabs.com
2ed170fa23 Add tests for api additions. Begin adding tests for pool_manager additions 2020-05-06 17:45:47 -07:00
kirby@puppetlabs.com
ebde903ddc Start adding tests for ondemandvm 2020-04-30 21:02:30 -07:00
kirby@puppetlabs.com
62aaa37f78 Fix accepting request_id 2020-04-30 15:17:15 -07:00
kirby@puppetlabs.com
2b96d7e476 Fix tests for changes 2020-04-30 12:31:40 -07:00
kirby@puppetlabs.com
90e09bfe1c Replace connection_pool with vmpooler generic_connection_pool. Fix tests for changes. 2020-04-30 12:25:01 -07:00
kirby@puppetlabs.com
b32b88b753 Add parameters for redis connection pool size and timeout values. 2020-04-30 12:25:01 -07:00
kirby@puppetlabs.com
9973ed878f Implement redis connection pooling, multi, and pipelines. 2020-04-30 12:25:01 -07:00
kirby@puppetlabs.com
52bf6c4c89 First attempt at adding connection pool to pool manager 2020-04-30 12:25:01 -07:00
kirby@puppetlabs.com
70f0482d33 Provisioning on demand initially functioning prototype. 2020-04-30 12:25:01 -07:00
kirby@puppetlabs.com
edd9d9e62c Handle the delta between requested and configured limits 2020-04-30 12:25:01 -07:00
kirby@puppetlabs.com
11c5107279 Add concurrent-ruby and configure additional parts for provisioning on demand 2020-04-30 12:25:01 -07:00
kirby@puppetlabs.com
63712741a0 (POOLER-158) Getting started with provisioning on demand 2020-04-30 12:25:01 -07:00
Jenkins
e9a79cb6db (GEM) update vmpooler version to 0.11.3 2020-04-29 15:02:04 +00:00
Brandon High
9b41a542e9
Merge pull request #374 from puppetlabs/DIO-608
(DIO-608) vmpooler SUT handed out multiple times
2020-04-23 17:03:34 -07:00
Samuel Beaulieu
9c6f50691d (DIO-608) vmpooler SUT handed out multiple times
Before this change if the smove returned false, we would continue handing out the VM
which presumably could still be in the 'ready' state. Upon 'delete' that ready VM would not be
picked up and return a 404 which is consistent with the behavior seen. Adding a metric to keep
track of the smove failures since this is not expected. I think some API logging would be good
to add in the future.
2020-04-23 16:10:36 -05:00
Brandon High
48b4fb9a6b
Merge pull request #373 from jcoconnor/MAINT-Update-Codeowners
(MAINT) Update CODEOWNERS
2020-04-16 10:29:51 -07:00
John O'Connor
56a6e61dc7 (MAINT) Update CODEOWNERS
Changing ownership to DIO
2020-04-16 18:25:51 +01:00
Jenkins
4019a082f0 (GEM) update vmpooler version to 0.11.2 2020-04-16 15:54:02 +00:00