Commit graph

919 commits

Author SHA1 Message Date
Samuel
ae10bd4e22 (POOLER-123) Implement a max TTL (#349)
* (POOLER-123) Implement a max TTL

Before this change, we could checkout a vm and set the lifetime to a
very high number which would esssentially keep the vm running forever.
Now implementing a config setting max_lifetime_upper_limit which enforces
a maximum lifetime in hours both for initial checkout and extending a
running vm

* (POOLER-123) Improve PUT vm endpoint error messaging

Prior to this commit the PUT vm endpoint didn't give any useful
information about why a user's request failed.

This commit updates PUT to output a more helpful set of error messages
in the `failure` key that gets returned in the JSON response.

* (POOLER-123) Update max_lifetime_upper_limit key

This commit switches the max_lifetime_upper_limit key from being a
symbol to being a string, which is what the config hash seems to contain.

* (maint) Add option to disable Redis persistence in docker-compose

This commit is just a handy little command override to the redis
container to prevent persistence.
2019-12-05 09:35:30 -07:00
mattkirby
114cb9f398
Merge pull request #347 from highb/update_changlog_0.8.2
Update CHANGELOG for 0.8.2
2019-11-11 15:34:13 -08:00
Brandon High
86dbc783ef
Update CHANGELOG for 0.8.2
This commit updates the CHANGELOG, and fixes some Markdown linter issues
with the CHANGELOG.
2019-11-11 15:28:13 -08:00
Jenkins
8a17c5fa37 (GEM) update vmpooler version to 0.8.2 2019-11-06 20:34:28 +00:00
mattkirby
8c2ddf3604
Merge pull request #345 from highb/imp/master/QENG-7530_add_hostname_uniqueness_check
(QENG-7530) Add check for unique hostnames
2019-11-06 12:14:53 -08:00
mattkirby
e53d27afab
Merge pull request #346 from highb/ci/master/fix_rubocop_config
Update rubocop configs
2019-11-06 09:18:05 -08:00
Brandon High
019ed021b0
(QENG-7530) Add check for unique hostnames
Prior to this commit the pooler had no awareness of the complete set of
hostnames that are currently in use. This meant that it was possible to
allocate the same hostname twice, which would result in the original
host with that hostname becoming unreachable.

This commit adds a check for the existence of the
`vmpooler__vm__<hostname>` key before attempting to  clone the vm.
This should prevent duplicate hostnames.

If the hostname is already taken, `_clone_vm` will retry with a new
random hostname multiple times before raising an exception.
2019-11-04 15:53:05 -08:00
Brandon High
35475546ef
Update rubocop configs
Previously, there were some rubocop rule names that were causing rubocop
to fail to run entirely.
This commit updates the rubocop configs to match the new rubocop rule
names so that we can see all the issues that need correcting.
2019-11-04 14:57:53 -08:00
mattkirby
1df13e4974
Merge pull request #344 from highb/imp/master/QENG-7530_update_hostname_handling_for_human_hostnames
(QENG-7530) Fix hostname_shorten regex
2019-11-01 15:22:54 -07:00
Brandon High
625472df35
(QENG-7530) Fix hostname_shorten regex
Prior to this commit the hostname_shorten regex wouldn't match the
updated human readable hostnames because they contain dashes.
This commit updates the regex to capture dashes in the hostname, and
adds a few specs to verify that behavior.
2019-11-01 10:30:56 -07:00
mattkirby
2b5d9c0dd9
Merge pull request #343 from mattkirby/changelog_update
Update changelog for 0.8.1 release
2019-10-30 10:53:12 -07:00
kirby@puppetlabs.com
3bde636803 Update changelog for 0.8.1 release 2019-10-30 10:52:01 -07:00
Jenkins
3732ed750e (GEM) update vmpooler version to 0.8.1 2019-10-25 16:35:08 +00:00
Brandon High
6adb2bc88a
Merge pull request #342 from mattkirby/qeng_7350_gemspec
Add spicy-proton to vmpooler.gemspec
2019-10-25 09:32:25 -07:00
kirby@puppetlabs.com
fa5aa8d0be Add spicy-proton to vmpooler.gemspec
This commit adds the spicy-proton gem to vmpooler.gemspec. Without this change the spicy-proton gem is in the Gemfile, but not the gemspec, causing issues when deploying from gem.
2019-10-25 09:00:01 -07:00
Jenkins
85665a0856 (GEM) update vmpooler version to 0.8.0 2019-10-25 00:08:48 +00:00
mattkirby
8a32ffb250
Merge pull request #341 from highb/imp/master/QENG-7530_human_readable_names
(QENG-7530) Make VM names more human readable
2019-10-24 16:59:04 -07:00
Jenkins
8c9b69b85d (GEM) update vmpooler version to 0.7.2 2019-10-24 23:47:08 +00:00
Brandon High
2ca6d49aeb
(QENG-7530) Make VM names more human readable
Prior to this commit hostnames for VMs provisioned by vmpooler were 15
random characters. This is difficult for humans to tell apart.

This commit updates the naming to use the `spicy-proton` gem to generate
adjective noun pair names for the VMs, which I think would be easier for
humans to tell apart, as well as fun and memorable to say.

The random name should not exceed 15 characters in order to prevent
issues with NETBIOS, etc as discussed in the attached ticket.
2019-10-24 09:12:18 -07:00
Kevin Imber
6cbc16cd80
Merge pull request #340 from mattkirby/pooler_150_1
Simplify declaration of checkoutlock mutex
2019-10-23 09:35:55 -07:00
kirby@puppetlabs.com
0e1a6da043 Simplify declaration of checkoutlock mutex
This commit updates the way that checkoutlock is defined so it is not passed through bin/vmpooler. Without this change there's an unnecessary layer the mutex passes through.
2019-10-23 03:52:08 -07:00
Kevin Imber
a6e3e3a98f
Merge pull request #339 from mattkirby/pooler_150
(POOLER-150) Synchronize checkout operations for API
2019-10-22 09:02:35 -07:00
kirby@puppetlabs.com
30bf2074fe (POOLER-150) Synchronize checkout operations for API
This commit adds a shared mutex to vmpooler API so that checkout requests can be synchronized across threads. Without this change it is possible in some scenarios for vmpooler to allocate the same SUT to different API requests for a VM.
2019-10-21 14:24:34 -07:00
Samuel
79bd140ab9
Merge pull request #338 from quorten/master
(POOLER-148) Fix undefined variable bug in _check_ready_vm.
2019-09-04 10:21:06 -05:00
Andrew Makousky
a2548d11e8
(POOLER-148) Improve code comment.
Co-Authored-By: Samuel <samuel@puppet.com>
2019-09-04 01:32:20 +00:00
Andrew Makousky
79ac9ad37e (POOLER-148) Fix undefined variable bug in _check_ready_vm.
The host['boottime'] variable in the function _check_ready_vm no longer
has its parent object in reference due to the refactoring in pull
request #269.  So in order to get the same information without the
performance impact from duplicate object lookups, we get similar
information from the time that the VM is ready.
2019-08-30 18:32:14 -05:00
Kevin Imber
df90d56721
Merge pull request #337 from mattkirby/codeowners
Add CODEOWNERS file to vmpooler
2019-08-26 15:04:30 -07:00
kirby@puppetlabs.com
33b04b384c Add CODEOWNERS file to vmpooler 2019-08-26 14:55:42 -07:00
Jenkins
b560cf4d28 (GEM) update vmpooler version to 0.7.1 2019-08-26 19:08:08 +00:00
Spencer McElmurry
f229d404e4
Merge pull request #336 from mattkirby/fix_pooler_147
(POOLER-147) Fix create_linked_clone pool option
2019-08-23 11:02:15 -05:00
kirby@puppetlabs.com
267772d8eb (POOLER-147) Fix create_linked_clone pool option
This commit updates the create_linked_clone pool option to correctly detect when linked clones have been set at a pool level. Without this change a pool setting create_linked_clone to false is not interpreted correctly, and a linked clone is created if possible.
2019-08-22 14:32:06 -07:00
mattkirby
059a46ca93
Merge pull request #335 from mattkirby/changelog_070
(MAINT) Update changelog for 0.7.0 release
2019-08-21 15:38:42 -07:00
kirby@puppetlabs.com
95a22e951c (MAINT) Update changelog for 0.7.0 release 2019-08-21 15:29:27 -07:00
Jenkins
9f2d653241 (GEM) update vmpooler version to 0.7.0 2019-08-21 21:19:39 +00:00
mchllweeks
edfcb66c5f
Merge pull request #334 from mattkirby/pooler_142
(POOLER-142) Add running host to vm API data
2019-08-21 12:49:45 -07:00
kirby@puppetlabs.com
9c5a0d114b (POOLER-142) Add running host to vm API data
This change adds the running host for a VM to the API data available via /vm/hostname. Without this change the running host would be logged to vmpooler log, but not available any other way. Additionally, the data will specify if a machine has been migrated. Without this change parent host data for a vmpooler machine is not available via the vmpooler API.
2019-08-21 12:43:06 -07:00
Samuel
9d48bc1b7e
Merge pull request #333 from mattkirby/vmp_optional_linkedclone
Make it possible to disable linked clones
2019-08-12 11:42:09 -05:00
kirby@puppetlabs.com
19a2268ecf Add changelog 2019-08-06 14:37:26 -07:00
kirby@puppetlabs.com
09a382a10f Make it possible to disable linked clones
This commit adds a new configuration parameter to allow setting whether to create linked clones on a global, or per pool basis. Without this change vmpooler would always attempt to create linked clones. The default behavior of creating linked clones is preserved.
2019-08-06 14:29:31 -07:00
Jenkins
d319643123 (GEM) update vmpooler version to 0.6.3 2019-07-29 17:22:43 +00:00
Spencer McElmurry
8a3f0bb742
Merge pull request #332 from puppetlabs/pooler-143
(POOLER-143) Add clone_target config change to API
2019-07-29 10:20:47 -07:00
Spencer McElmurry
98a547b807 (POOLER-143) Add clone_target config change to API
This allows the user to change the cluster in which the targeted pool
will clone to. Upon configuration change, the thread will wake up and
execute the change within 1 second.
2019-07-29 08:53:27 -07:00
mattkirby
5bbaf7e8cf
Merge pull request #331 from mattkirby/changelog
(MAINT) Update changelog for 0.6.2
2019-07-17 15:34:33 -07:00
kirby@puppetlabs.com
6b5f10936d (MAINT) Update changelog for 0.6.2 2019-07-17 15:34:11 -07:00
Jenkins
3fef59d776 (GEM) update vmpooler version to 0.6.2 2019-07-17 22:06:33 +00:00
Spencer McElmurry
211c56d669
Merge pull request #330 from mattkirby/pooler_140_1
(POOLER-140) Fix typo in domain
2019-07-17 14:38:18 -07:00
kirby@puppetlabs.com
7abfb97ab5 (POOLER-140) Fix typo in domain
This commit updates the reference to domain from vmpooler config. Without this change the domain value is read as an empty string and breaks checkouts.
2019-07-17 14:27:19 -07:00
Spencer McElmurry
4aad84a045
Merge pull request #329 from mattkirby/pooler_140_1
(POOLER-140) Ensure a VM is alive at checkout
2019-07-17 12:09:56 -07:00
kirby@puppetlabs.com
d6e948d34d (POOLER-140) Ensure a VM is alive at checkout
This commit duplicates the vm_ready? check to the API layer to allow for API to validate that a VM is alive at checkout. Without this change API relies upon the checks in pool_manager validating pools. This change should allow for additional insight into whether a machine is in a ready state and resopnding at checkout time.
2019-07-17 12:03:55 -07:00
Jenkins
a755d8d6a2 (GEM) update vmpooler version to 0.6.1 2019-05-08 16:48:35 +00:00