openshift / openshift-sdn

Apache License 2.0
69 stars 63 forks source link

Don't return an error if the plugin is unknown #212

Closed dcbw closed 8 years ago

dcbw commented 8 years ago

We need to silently accept unknown plugins in origin, so if we don't know about it, don't return an error that Origin will exit on.

pravisankar commented 8 years ago

If there is a typo in the network plugin name, this will hide the issue and returns nil. Instead I prefer the caller/origin to do something like: if nodeConfig.NetworkConfig.NetworkPluginName != "" { controller, endpointFilter, err := factory.NewPlugin(...) ... }

dcbw commented 8 years ago

I know, but the problem is that we need to support existing OpenShift plugins that are not openshift-sdn. Like Contrail... Those will specify a network plugin name that we don't match in openshift-sdn, but it will still get carried through to Kubernetes and be used there.

danwinship commented 8 years ago

lgtm. @pravisankar we didn't log anything before in that case either, so this is consistent with the old code