mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
(POOLER-107) Add configuration API endpoint
This commit adds a configuration endpoint to the vmpooler API. Pool size, and pool template, can be adjusted for pools that are configured at vmpooler application start time. Pool template changes trigger a pool refresh, and the new template has delta disks created automatically by vmpooler. Additionally, the capability to create template delta disks is added to the vsphere provider, and this is implemented to ensure that templates have delta disks created at application start time. The mechanism used to find template VM objects is simplified to make the flow of logic easier to understand. As an additional benefit, performance of this lookup is improved by using FindByInventoryPath. A table of contents is added to API.md to ease navigation. Without this change API.md has no table of contents and is difficult to navigate. Add mutex object for managing pool configuration updates This commit adds a mutex object for ensuring that pool configuration changes are synchronized across multiple running threads, removing the possibility of two threads attempting to update something at once, without relying on redis data. Without this change this is managed crudely by specifying in redis that a configuration update is taking place. This redis data is left so the REPOPULATE section of _check_pool can still identify when a configuration change is in progress, and prevent a pool from repopulating at that time. Add wake up event for pool template changes This commit adds a wake up event to detect pool template changes. Additionally, GET /config has a template_ready section added to the output for each pool, which makes clear when a pool is ready to populate itself.
This commit is contained in:
parent
e781ed258b
commit
9bb4df7d8e
11 changed files with 1393 additions and 46 deletions
|
|
@ -443,6 +443,11 @@
|
|||
# The value represents a percentage and applies to both memory and CPU
|
||||
# (optional; default: 90)
|
||||
#
|
||||
# - experimental_features (Only affects API config endpoints)
|
||||
# Enable experimental API capabilities such as changing pool template and size without application restart
|
||||
# Expects a boolean value
|
||||
# (optional; default: false)
|
||||
#
|
||||
# Example:
|
||||
|
||||
:config:
|
||||
|
|
@ -458,6 +463,7 @@
|
|||
- 'project'
|
||||
domain: 'company.com'
|
||||
prefix: 'poolvm-'
|
||||
experimental_features: true
|
||||
|
||||
# :pools:
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue