contiv / netplugin

Container networking for various use cases
Apache License 2.0
513 stars 177 forks source link

Network interface not added to contivVlanBridge in L2 mode #1108

Open basvandenbrink opened 6 years ago

basvandenbrink commented 6 years ago

Description

No pod connectivity after Contiv installation, because the phyical network interface is not added to the Open vSwitch bridge.

Expected Behavior

ovs-vsctl show shows virtual interfaces and the physical interface specified during installation. This was the case with contiv 1.1.7.

Observed Behavior

ovs-vsctl show only shows virtual interfaces.

Steps to Reproduce (for bugs)

  1. sudo kubeadm init --kubernetes-version v1.8.4 --apiserver-advertise-address=10.100.0.1
  2. Join other nodes
  3. ./install/k8s/install.sh -n 10.100.0.1 -v nic1
  4. netctl net rm contivh1
  5. netctl global set --fwd-mode bridge
  6. netctl net create -t default -n data --subnet=20.1.0.0/16 --gateway 20.1.1.254 --encap vlan -p 8 default-net
  7. Check contivVlanBridge on nodes: ovs-vsctl show

Your Environment

basvandenbrink commented 6 years ago

I think this commit is the cause. More specifically, this and this line.

magic7s commented 6 years ago

@basvandenbrink Is there a workaround that you found?

tiewei commented 6 years ago

I think this is using VLAN mode, right, you need to add VLAN_IF, to be more specifically, you need env vars for netplugin CONTIV_NETPLUGIN_VLAN_UPLINKS as "a comma-delimited list of netplugin uplink interfaces", and make sure you are using VLAN mode and bridge mode.

basvandenbrink commented 6 years ago

@magic7s Currently, I reverted to 1.1.7, but you can execute the following command to manually add the interface to the bridge: ovs-vsctl add-port contivVlanBridge <vlan_interface>.

@tiewei Yeah, I think the installer should have done that. Maybe, it is an issue of the installer and not the plugin itself.