Fix race in vsphere cloud provider
Fix race in vsphere cloud provider

When a go loop launches goroutines, it is a common mistake to assume
that the routines can reference the loop value from their specific loop
iteration. Actually, all goroutines share the same reference to the loop
veriable, and they typically all see the last value.

To correct this, the loop variable must be captured as a parameter to
the anonymous func.

This fix might eliminate the need for the retry logic below, but I do
not have enough information to back that up.

Signed-off-by: Jonathan Basseri <misterikkit@google.com>

Kubernetes-commit: a5c4f29a54a31da288fa4b2607a75795c9a7d0ec

kubernetes/legacy-cloud-providers