From f45cf10839ed1b14aa3e035818723777eeac7858 Mon Sep 17 00:00:00 2001 From: Rick Bradley Date: Mon, 11 Jul 2016 22:35:30 -0500 Subject: [PATCH] [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. --- lib/vmpooler/api/v1.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vmpooler/api/v1.rb b/lib/vmpooler/api/v1.rb index 2d76970..a8ef43f 100644 --- a/lib/vmpooler/api/v1.rb +++ b/lib/vmpooler/api/v1.rb @@ -98,7 +98,7 @@ module Vmpooler vm, name = fetch_single_vm(requested) if !vm failed = true - statsd.increment(statsd_prefix + '.checkout.empty.' + name, 1) + statsd.increment(statsd_prefix + '.checkout.empty.' + requested, 1) break else vms << [ name, vm ]