Skip to content

Commit

Permalink
Remove checkCSITranslationLibEntries
Browse files Browse the repository at this point in the history
Signed-off-by: Deep Debroy <ddebroy@docker.com>
  • Loading branch information
ddebroy committed Mar 19, 2019
1 parent b4d7833 commit de8f635
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions cmd/csi-provisioner/csi-provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,6 @@ var (
version = "unknown"
)

// check that the CSI plugin handles migration for the inTreePluginName according to:
// https://github.com/kubernetes/csi-translation-lib/blob/master/translate.go#L28
// A mismatch will lead to failed migration API calls like TranslateCSIPVToInTree. So warn of any mismatch but don't exit.
func checkCSITranslationLibEntries(csiPluginName, inTreePluginName string) {
if !csitranslationlib.IsMigratedCSIDriverByName(csiPluginName) {
klog.Warningf("Provisioner name: %s not registered in CSI translation library for performing migrations for %s", csiPluginName, inTreePluginName)
return
}
inTreePluginNameFromLib, err := csitranslationlib.GetInTreeNameFromCSIName(csiPluginName)
if err != nil {
klog.Warningf("Error getting InTree plugin name for migrated CSI plugin %s: %v", csiPluginName, err)
return
}
if inTreePluginNameFromLib != inTreePluginName {
klog.Warningf("Specified in-tree plugin: %s and in-tree plugin from CSI translation library: %s do not match", inTreePluginName, inTreePluginNameFromLib)
return
}
}

func init() {
var config *rest.Config
var err error
Expand Down

0 comments on commit de8f635

Please sign in to comment.