mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
(POOLER-70) Update migrate_vm_and_record_timing for VM Provider
Previously the Pool Manager would use vSphere objects directly. This commit - Modifies the migrate_vm_and_record_timing method to use VM and Pool names instead of VM and Pool objects.
This commit is contained in:
parent
cf15829f05
commit
3f6ead8134
2 changed files with 11 additions and 15 deletions
|
|
@ -506,11 +506,11 @@ module Vmpooler
|
|||
end
|
||||
end
|
||||
|
||||
def migrate_vm_and_record_timing(vm_object, vm_name, pool, host, source_host_name, dest_host_name, provider)
|
||||
def migrate_vm_and_record_timing(vm_name, pool_name, source_host_name, dest_host_name, provider)
|
||||
start = Time.now
|
||||
provider.migrate_vm_host(vm_object, host)
|
||||
provider.migrate_vm_to_host(pool_name, vm_name, dest_host_name)
|
||||
finish = '%.2f' % (Time.now - start)
|
||||
$metrics.timing("migrate.#{pool}", finish)
|
||||
$metrics.timing("migrate.#{pool_name}", finish)
|
||||
$metrics.increment("migrate_from.#{source_host_name}")
|
||||
$metrics.increment("migrate_to.#{dest_host_name}")
|
||||
checkout_to_migration = '%.2f' % (Time.now - Time.parse($redis.hget("vmpooler__vm__#{vm_name}", 'checkout')))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue