Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated cherry pick of #50722 upstream release 1.7 #51079

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkg/cloudprovider/providers/vsphere/vsphere.go
Expand Up @@ -19,6 +19,7 @@ package vsphere
import (
"errors"
"fmt"
"hash/fnv"
"io"
"io/ioutil"
"net"
Expand Down Expand Up @@ -1401,7 +1402,9 @@ func (vs *VSphere) CreateVolume(volumeOptions *VolumeOptions) (volumePath string

// Check if the VM exists in kubernetes cluster folder.
// The kubernetes cluster folder - vs.cfg.Global.WorkingDir is where all the nodes in the kubernetes cluster are created.
dummyVMFullName := DummyVMPrefixName + "-" + volumeOptions.Name
fnvHash := fnv.New32a()
fnvHash.Write([]byte(volumeOptions.Name))
dummyVMFullName := DummyVMPrefixName + "-" + fmt.Sprint(fnvHash.Sum32())
vmRegex := vs.cfg.Global.WorkingDir + dummyVMFullName
dummyVM, err := f.VirtualMachine(ctx, vmRegex)
if err != nil {
Expand Down