Closed dougbtv closed 6 months ago
Example:
b63593600d9170f3f9e95b74fbe8a950e1690b23b7303277a9e89c8): error adding pod default_samplepod-bridge to CNI network "multus-cni-network": plugin type="multus" name="multus-cni-network" failed (add): Multus: [default/samplepod-bridge/772c8b51-d36f-413d-aa66-efea9b618e35]: error loading k8s delegates k8s args: TryLoadPodDelegates: error in getting k8s network for pod: GetNetworkDelegates: failed getting the delegate: getKubernetesDelegate: cannot find a network-attachment-definition () in namespace (default): resource name may not be empty
It's there with:
cannot find a network-attachment-definition () in namespace (default): resource name may not be empty
But I'd prefer something that's actionable by the user. Like "you have a mistake in the format of your */networks annotation"
With the annotation:
annotations:
k8s.v1.cni.cncf.io/networks: "bridge-conf-1,bridge-conf-2,bridge-conf-3,bridge-conf-4,"
The error message is:
[error] getKubernetesDelegate: cannot find a network-attachment-definition () in namespace (default): resource name may not be empty
[error] GetNetworkDelegates: failed getting the delegate: getKubernetesDelegate: cannot find a network-attachment-definition () in namespace (default): resource name may not be empty
[error] TryLoadPodDelegates: error in getting k8s network for pod: GetNetworkDelegates: failed getting the delegate: getKubernetesDelegate: cannot find a network-attachment-definition () in namespace (default): resource name may not be empty```
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.
What would you like to be added: Better error output when the annotation contains a (parseable) user error.
Why is this needed: When users make a simple mistake, it can sometimes be hard to diagnose. For example, say you have a
*/networks: foo,bar,quux,
annotation, we should have clear outputSecondarily, is having a trailing comma a bug? I think that should be valid user input. We can totally handle that.