diff --git a/pkg/rbd/rbd_attach.go b/pkg/rbd/rbd_attach.go index a93e7c379..45bc22792 100644 --- a/pkg/rbd/rbd_attach.go +++ b/pkg/rbd/rbd_attach.go @@ -237,7 +237,7 @@ func attachRBDImage(volOptions *rbdVolume, userID string, credentials map[string moduleName = nbd } - _, found := waitForPath(volOptions.Pool, image, 1, useNBD) + devicePath, found := waitForPath(volOptions.Pool, image, 1, useNBD) if !found { attachdetachMutex.LockKey(imagePath) @@ -263,9 +263,8 @@ func attachRBDImage(volOptions *rbdVolume, userID string, credentials map[string if err != nil { return "", err } - + devicePath, err = createPath(volOptions, userID, credentials) } - devicePath, err := createPath(volOptions, userID, credentials) return devicePath, err } diff --git a/pkg/util/cachepersister.go b/pkg/util/cachepersister.go index 3795cebf0..63a5c0f42 100644 --- a/pkg/util/cachepersister.go +++ b/pkg/util/cachepersister.go @@ -27,7 +27,7 @@ const ( PluginFolder = "/var/lib/kubelet/plugins" ) -// ForAllFunc stores metdata with identifier +// ForAllFunc stores metadata with identifier type ForAllFunc func(identifier string) error // CachePersister interface implemented for store