foundation-model-stack / multi-nic-cni

https://foundation-model-stack.github.io/multi-nic-cni/
Apache License 2.0
33 stars 5 forks source link

Unavailability of unrelated subnet causes failure of adding #117

Closed sunya-ch closed 1 year ago

sunya-ch commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

When there is a non-overlap secondary subnet in the cluster, multi-nic-cni failed to add the rest secondary interfaces. This is unexpected behavior since it should consider only available interfaces.

{"level":"debug","ts":"2023-06-22T14:41:54.696Z","caller":"multi-nic/multi-nic.go:68","msg":"Received an ADD request for: conf=&{{0.3.0 multi-nic-network multi-nic map[] {multi-nic-ipam} {[]  [] []} map[] <nil>} map[cniVersion:0.3.0 mode:l3 type:ipvlan] 192.168.0.0/16 [10.241.131.0/24 10.241.130.0/24 10.241.129.0/24] [  ] [ens3 enp12s0 ] true  11000 <nil>}"}
{"level":"debug","ts":"2023-06-22T14:41:54.733Z","caller":"multi-nic/multi-nic.go:148","msg":"Exec ADD net1-0: {\"cniVersion\":\"0.3.0\",\"name\":\"net1-0\",\"type\":\"ipvlan\",\"ipam\":{\"type\":\"static\",\"addresses\":[{\"address\":\"192.168.1.201/18\"}]},\"dns\":{},\"master\":\"ens3\",\"mode\":\"l3\",\"mtu\":0}"}
{"level":"debug","ts":"2023-06-22T14:41:54.888Z","caller":"multi-nic/multi-nic.go:148","msg":"Exec ADD net1-1: {\"cniVersion\":\"0.3.0\",\"name\":\"net1-1\",\"type\":\"ipvlan\",\"ipam\":{\"type\":\"static\",\"addresses\":[{\"address\":\"192.168.65.201/18\"}]},\"dns\":{},\"master\":\"enp12s0\",\"mode\":\"l3\",\"mtu\":0}"}
{"level":"debug","ts":"2023-06-22T14:41:54.944Z","caller":"multi-nic/multi-nic.go:148","msg":"Exec ADD net1-2: {\"cniVersion\":\"0.3.0\",\"name\":\"net1-2\",\"type\":\"ipvlan\",\"ipam\":{\"type\":\"static\",\"addresses\":[]},\"dns\":{},\"master\":\"\",\"mode\":\"l3\",\"mtu\":0}"}
{"level":"debug","ts":"2023-06-22T14:41:54.956Z","caller":"multi-nic/multi-nic.go:151","msg":"Fail execPlugin {\"cniVersion\":\"0.3.0\",\"name\":\"net1-2\",\"type\":\"ipvlan\",\"ipam\":{\"type\":\"static\",\"addresses\":[]},\"dns\":{},\"master\":\"\",\"mode\":\"l3\",\"mtu\":0}: IPAM plugin returned missing IP config"}

To Reproduce Steps to reproduce the behavior:

Expected behavior A clear and concise description of what you expected to happen.

Should continue if masterName = "".

https://github.com/foundation-model-stack/multi-nic-cni/blob/fba59cff7b7c320fcd12c712209303f0caa7f4ca/cni/plugins/main/multi-nic/ipvlan.go#L42-L45

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Add any other context about the problem here.

sunya-ch commented 1 year ago

WIP: https://github.com/sunya-ch/multi-nic-cni/commit/245a670b104b58c939ea687f5be346fd99abeb1e

sunya-ch commented 1 year ago

should be fixed by https://github.com/foundation-model-stack/multi-nic-cni/pull/119