[QENG-4075] Fix bug with template name on allocation failure

We're returning [nil,nil] in this case, meaning that name will not be set. This
means we'll get an error trying to concatenate the stats string. Use the
requested template name here instead.
This commit is contained in:
Rick Bradley 2016-07-11 22:35:30 -05:00
parent 3c531d3ec3
commit f45cf10839

View file

@ -98,7 +98,7 @@ module Vmpooler
vm, name = fetch_single_vm(requested) vm, name = fetch_single_vm(requested)
if !vm if !vm
failed = true failed = true
statsd.increment(statsd_prefix + '.checkout.empty.' + name, 1) statsd.increment(statsd_prefix + '.checkout.empty.' + requested, 1)
break break
else else
vms << [ name, vm ] vms << [ name, vm ]