Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is Contiv-vpp supported as a secondary plugin in Multus #1740

Open
dushyantbehl opened this issue Apr 29, 2020 · 0 comments
Open

Is Contiv-vpp supported as a secondary plugin in Multus #1740

dushyantbehl opened this issue Apr 29, 2020 · 0 comments

Comments

@dushyantbehl
Copy link

My requirement is to setup Contiv on a network running Multus+Flannel with some nodes running Contiv/VPP. This is an updated version of the issue(#1739).

Here's what I have done so far -

  1. Bare K8 cluster running Multus + Flannel
  2. Apply contiv-vpp.yaml
  3. Created a crd with contiv-cni as Network Attachment Definition -
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
  name: contiv-cni-test
spec:
  config: '{
    "cniVersion": "0.3.1",
    "type": "contiv-cni",
    "grpcServer": "/var/run/contiv/cni.sock",
    "logFile": "/var/run/contiv/cni.log"
  }'
  1. Tried to create a Pod with the above network-attachment-definition in metadata as follows,
metadata:
  name: pod3
  annotations:
    k8s.v1.cni.cncf.io/networks: contiv-cni-test

After which contiv earlier threw an error, cannot create eth0 as the file exists

I manually modified the file plugins/ipnet/pod.go and changed the default podInterfaceHostName to eth1 as follows -

diff --git a/plugins/ipnet/pod.go b/plugins/ipnet/pod.go
index f6cd032..fa57034 100755
--- a/plugins/ipnet/pod.go
+++ b/plugins/ipnet/pod.go
@@ -46,7 +46,7 @@ const (
        podLinuxLoopLogicalNamePrefix = "linux-loop-"

        // interface host name as required by Kubernetes for every pod
-       podInterfaceHostName = "eth0" // required by Kubernetes
+       podInterfaceHostName = "eth1" // required by Kubernetes

        // prefix for logical name of AF-Packet interface (VPP) connecting a pod
        podAFPacketLogicalNamePrefix = "afpacket"

After recompiling contiv, I tested with updated docker images and got the following error -

Failed to create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container "99dcc03daff59b936f3761ff2aa9d7be642e01c8fc3f98a224ea6653e66dedf2" network for pod "pod3": networkPlugin cni failed to set up pod "pod3_default" network: Multus: [default/pod3]: error adding container to network "contiv-cni-test": delegateAdd: error invoking DelegateAdd - "contiv-cni": error in getting result from AddNetwork: rpc error: code = Unknown desc = KeyErrors: [config/linux/l3/v2/route/0.0.0.0/0/linux-tap-99dcc03daff59b936f3761ff2aa9d7be642e01c8fc3f98a224ea6 (CREATE): failed to add linux route: file exists]

Note the failed to add linux route: file exists

What I wanna know before doing anything is that does Contiv support Multus and can act as a secondary plugin by changing some configuration? or is there any plan to extend support to Multus.

Thanks for any support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant