X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6d87ae37bbc00cbb6fffb47ade3ec824b501b3df..84c753c29346450bae7efd8f8bcd11aa7ea71109:/lib/dispatchcloud/driver.go diff --git a/lib/dispatchcloud/driver.go b/lib/dispatchcloud/driver.go index 49437e3187..f1ae68c001 100644 --- a/lib/dispatchcloud/driver.go +++ b/lib/dispatchcloud/driver.go @@ -17,6 +17,9 @@ import ( "golang.org/x/crypto/ssh" ) +// Map of available cloud drivers. +// Clusters.*.Containers.CloudVMs.Driver configuration values +// correspond to keys in this map. var Drivers = map[string]cloud.Driver{ "azure": azure.Driver, "ec2": ec2.Driver, @@ -150,7 +153,11 @@ func (is instrumentedInstanceSet) Create(it arvados.InstanceType, image cloud.Im func (is instrumentedInstanceSet) Instances(tags cloud.InstanceTags) ([]cloud.Instance, error) { instances, err := is.InstanceSet.Instances(tags) is.cv.WithLabelValues("List", boolLabelValue(err != nil)).Inc() - return instances, err + var instrumented []cloud.Instance + for _, i := range instances { + instrumented = append(instrumented, instrumentedInstance{i, is.cv}) + } + return instrumented, err } type instrumentedInstance struct {