Jump out of spec translation early if the spec is not migratable. Unit tests work after all!

This commit is contained in:
David Zhu 2019-11-14 23:51:58 -08:00
parent 6e716af89e
commit 41c65f4740

View File

@ -282,6 +282,10 @@ func translateInTreeSpecToCSIIfNeeded(spec *volume.Spec, nodeName types.NodeName
if err != nil {
return nil, err
}
if !migratable {
// Jump out of translation fast so we don't check the node if the spec itself is not migratable
return spec, nil
}
migrationSupportedOnNode, err := isCSIMigrationSupportedOnNode(nodeName, spec, vpm, csiMigratedPluginManager)
if err != nil {
return nil, err