mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
Add support for migrating VMs to pool_manager.
This commit adds a capability to pool_manager to migrate VMs placed in the migrating queue. When a VM is checked out an entry is created in vmpooler__migrating. The existing process for evaluating VM states executes the migrate_vm method for the provided VM, and removes it from the queue. The least used compatible host for the provided VM is selected and, if necessary, a migration to the lesser used host is performed. Migration time and time from the task being queued until completion are both tracked with the redis VM object in 'migration_time' and 'checkout_to_migration'. The migration time is logged in the vmpooler.log, or the VM is reported as not requiring migration. Without this change VMs are not evaluated for checkout at request time. Add a method to wrap find_vm and find_vm_heavy in order to allow a single operation to be performed that does both. This commit also adds support for a configuration setting called migration_limit that makes migration at checkout optional. Additionally, logging is added to report a VM parent host when it is checked out. Without this change vmpooler assumes that migration at checkout is always enabled. If this setting is not present, or if the setting is 0, then migration at checkout will be disabled. If the setting is greater than 0 then that setting will be used to enforce a limit for the number of simultaneous migrations that will be evaluated. Documentation of this configuration option is added to the vmpooler.yaml.example file.
This commit is contained in:
parent
538f30af8e
commit
58a548bc90
3 changed files with 84 additions and 16 deletions
|
|
@ -225,6 +225,13 @@
|
|||
# If set, prefixes all created VMs with this string. This should include
|
||||
# a separator.
|
||||
# (optional; default: '')
|
||||
#
|
||||
# - migration_limit
|
||||
# When set to any value greater than 0 enable VM migration at checkout.
|
||||
# When enabled this capability will evaluate a VM for migration when it is requested
|
||||
# in an effort to maintain a more even distribution of load across compute resources.
|
||||
# The migration_limit ensures that no more than n migrations will be evaluated at any one time
|
||||
# and greatly reduces the possibilty of VMs ending up bunched together on a particular host.
|
||||
|
||||
# Example:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue