mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
(POOLER-190) TBD Markers only
This commit is contained in:
parent
d47df61c19
commit
cd7242af11
2 changed files with 11 additions and 0 deletions
|
|
@ -326,6 +326,8 @@ module Vmpooler
|
||||||
else
|
else
|
||||||
$logger.log('s', "[!] [#{pool_name}] failed while cloning VM with an error: #{e}")
|
$logger.log('s', "[!] [#{pool_name}] failed while cloning VM with an error: #{e}")
|
||||||
end
|
end
|
||||||
|
# TBD: not convinced we need a raise here
|
||||||
|
# Check with Matt.
|
||||||
raise
|
raise
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -991,6 +993,8 @@ module Vmpooler
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
# TBD - we should NOT set this as prepared if it doesn't exist
|
||||||
|
# TBD - Look for error creating template delta disks more than once.
|
||||||
redis.hset('vmpooler__template__prepared', pool['name'], pool['template'])
|
redis.hset('vmpooler__template__prepared', pool['name'], pool['template'])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -1045,6 +1049,7 @@ module Vmpooler
|
||||||
def update_pool_template(pool, provider, configured_template, prepared_template, redis)
|
def update_pool_template(pool, provider, configured_template, prepared_template, redis)
|
||||||
pool['template'] = configured_template
|
pool['template'] = configured_template
|
||||||
$logger.log('s', "[*] [#{pool['name']}] template updated from #{prepared_template} to #{configured_template}")
|
$logger.log('s', "[*] [#{pool['name']}] template updated from #{prepared_template} to #{configured_template}")
|
||||||
|
# TBD - Before we drain pool check if new template exists.
|
||||||
# Remove all ready and pending VMs so new instances are created from the new template
|
# Remove all ready and pending VMs so new instances are created from the new template
|
||||||
drain_pool(pool['name'], redis)
|
drain_pool(pool['name'], redis)
|
||||||
# Prepare template for deployment
|
# Prepare template for deployment
|
||||||
|
|
@ -1298,6 +1303,8 @@ module Vmpooler
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TBD - add limit check here.
|
||||||
|
|
||||||
(pool_size - total.to_i).times do
|
(pool_size - total.to_i).times do
|
||||||
if redis.get('vmpooler__tasks__clone').to_i < $config[:config]['task_limit'].to_i
|
if redis.get('vmpooler__tasks__clone').to_i < $config[:config]['task_limit'].to_i
|
||||||
begin
|
begin
|
||||||
|
|
@ -1347,6 +1354,8 @@ module Vmpooler
|
||||||
# Evaluates a pool template to ensure templates are prepared adequately for the configured provider
|
# Evaluates a pool template to ensure templates are prepared adequately for the configured provider
|
||||||
# If a pool template configuration change is detected then template preparation is repeated for the new template
|
# If a pool template configuration change is detected then template preparation is repeated for the new template
|
||||||
# Additionally, a pool will drain ready and pending instances
|
# Additionally, a pool will drain ready and pending instances
|
||||||
|
# TBD - Should we really be checking if the template actually exists - lets do this .....
|
||||||
|
# and down pool or empty it ....
|
||||||
evaluate_template(pool, provider)
|
evaluate_template(pool, provider)
|
||||||
|
|
||||||
# Check to see if a pool size change has been made via the configuration API
|
# Check to see if a pool size change has been made via the configuration API
|
||||||
|
|
|
||||||
|
|
@ -304,6 +304,7 @@ module Vmpooler
|
||||||
# Get the template VM object
|
# Get the template VM object
|
||||||
raise("Pool #{pool_name} did not specify a full path for the template for the provider #{name}") unless valid_template_path? template_path
|
raise("Pool #{pool_name} did not specify a full path for the template for the provider #{name}") unless valid_template_path? template_path
|
||||||
|
|
||||||
|
# TBD - check that template exists?
|
||||||
template_vm_object = find_template_vm(pool, connection)
|
template_vm_object = find_template_vm(pool, connection)
|
||||||
|
|
||||||
# Annotate with creation time, origin template, etc.
|
# Annotate with creation time, origin template, etc.
|
||||||
|
|
@ -1131,6 +1132,7 @@ module Vmpooler
|
||||||
def create_template_delta_disks(pool)
|
def create_template_delta_disks(pool)
|
||||||
@connection_pool.with_metrics do |pool_object|
|
@connection_pool.with_metrics do |pool_object|
|
||||||
connection = ensured_vsphere_connection(pool_object)
|
connection = ensured_vsphere_connection(pool_object)
|
||||||
|
# TBD - Verify template exists.
|
||||||
template_vm_object = find_template_vm(pool, connection)
|
template_vm_object = find_template_vm(pool, connection)
|
||||||
|
|
||||||
template_vm_object.add_delta_disk_layer_on_all_disks
|
template_vm_object.add_delta_disk_layer_on_all_disks
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue