k8snetworkplumbingwg / multus-cni

A CNI meta-plugin for multi-homed pods in Kubernetes
Apache License 2.0
2.29k stars 575 forks source link

Weird "interface name net1 already exists" on a build from master #1200

Closed dougbtv closed 6 months ago

dougbtv commented 6 months ago
  Normal   AddedInterface          2s  multus   Add eth0 [10.244.2.136/24] from cbr0
  Normal   AddedInterface          2s  multus   Add net1 [192.168.1.203/24] from default/macvlan-conf
  Normal   AddedInterface          2s  multus   Add eth0 [10.244.2.136/24] from multus-cni-network
  Warning  FailedCreatePodSandBox  0s  kubelet  Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create pod network sandbox k8s_samplepod_default_483d9f6e-59ab-4126-bb17-60d387a2f1dc_0(27857cf1380842cf2f3aa08cc30d1423ce19a1f7673af3ea2c575f4901061815): error adding pod default_samplepod to CNI network "multus-cni-network": plugin type="multus-shim" name="multus-cni-network" failed (add): CmdAdd (shim): CNI request failed with status 400: '&{ContainerID:27857cf1380842cf2f3aa08cc30d1423ce19a1f7673af3ea2c575f4901061815 Netns:/var/run/netns/ce50c8a0-12fa-4d19-b050-300c5637ac1a IfName:eth0 Args:IgnoreUnknown=1;K8S_POD_NAMESPACE=default;K8S_POD_NAME=samplepod;K8S_POD_INFRA_CONTAINER_ID=27857cf1380842cf2f3aa08cc30d1423ce19a1f7673af3ea2c575f4901061815;K8S_POD_UID=483d9f6e-59ab-4126-bb17-60d387a2f1dc Path: StdinData:[123 34 99 97 112 97 98 105 108 105 116 105 101 115 34 58 123 34 112 111 114 116 77 97 112 112 105 110 103 115 34 58 116 114 117 101 125 44 34 99 104 114 111 111 116 68 105 114 34 58 34 47 104 111 115 116 114 111 111 116 34 44 34 99 108 117 115 116 101 114 78 101 116 119 111 114 107 34 58 34 47 104 111 115 116 47 101 116 99 47 99 110 105 47 110 101 116 46 100 47 48 53 45 109 117 108 116 117 115 46 99 111 110 102 34 44 34 99 110 105 67 111 110 102 105 103 68 105 114 34 58 34 47 104 111 115 116 47 101 116 99 47 99 110 105 47 110 101 116 46 100 34 44 34 99 110 105 86 101 114 115 105 111 110 34 58 34 48 46 51 46 49 34 44 34 108 111 103 76 101 118 101 108 34 58 34 118 101 114 98 111 115 101 34 44 34 108 111 103 84 111 83 116 100 101 114 114 34 58 116 114 117 101 44 34 109 117 108 116 117 115 65 117 116 111 99 111 110 102 105 103 68 105 114 34 58 34 47 104 111 115 116 47 101 116 99 47 99 110 105 47 110 101 116 46 100 34 44 34 109 117 108 116 117 115 67 111 110 102 105 103 70 105 108 101 34 58 34 97 117 116 111 34 44 34 110 97 109 101 34 58 34 109 117 108 116 117 115 45 99 110 105 45 110 101 116 119 111 114 107 34 44 34 115 111 99 107 101 116 68 105 114 34 58 34 47 104 111 115 116 47 114 117 110 47 109 117 108 116 117 115 47 34 44 34 116 121 112 101 34 58 34 109 117 108 116 117 115 45 115 104 105 109 34 125]} ContainerID:"27857cf1380842cf2f3aa08cc30d1423ce19a1f7673af3ea2c575f4901061815" Netns:"/var/run/netns/ce50c8a0-12fa-4d19-b050-300c5637ac1a" IfName:"eth0" Args:"IgnoreUnknown=1;K8S_POD_NAMESPACE=default;K8S_POD_NAME=samplepod;K8S_POD_INFRA_CONTAINER_ID=27857cf1380842cf2f3aa08cc30d1423ce19a1f7673af3ea2c575f4901061815;K8S_POD_UID=483d9f6e-59ab-4126-bb17-60d387a2f1dc" Path:"" ERRORED: error configuring pod [default/samplepod] networking: [default/samplepod/483d9f6e-59ab-4126-bb17-60d387a2f1dc:macvlan-conf]: error adding container to network "macvlan-conf": DelegateAdd: cannot set "macvlan" interface name to "net1": validateIfName: interface name net1 already exists
dougbtv commented 6 months ago

Might be environment specific, couldn't get a repro on a second cluster...

dougbtv commented 6 months ago

This was a weird mistake in my environment where I had multus configure itself as the master plugin...... yep. That doesn't work.