mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
(maint) Raise error when ip address is not given to vm after clone.
This commit is contained in:
parent
8406247b4c
commit
eee7c4082a
2 changed files with 16 additions and 2 deletions
|
|
@ -470,6 +470,9 @@ module Vmpooler
|
|||
ip_start = Time.now
|
||||
ip = provider.get_vm_ip_address(new_vmname, pool_name)
|
||||
ip_finish = format('%<time>.2f', time: Time.now - ip_start)
|
||||
|
||||
raise StandardError, "failed to obtain IP after #{ip_finish} seconds" if ip.nil?
|
||||
|
||||
$logger.log('s', "[+] [#{pool_name}] Obtained IP for '#{new_vmname}' in #{ip_finish} seconds")
|
||||
|
||||
@redis.with_metrics do |redis|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue