The PR contains 2 commits: one fix to the datapath; the other e2e test which tests both the fix and the basic funtionatlity. The problem is the basic functionality part fails the e2e test. However, it is only reproducible in e2e test, not in dev cluster. We also included the same functionality in Anthos. I haven't figured out the reason.
You would need a Linux machine (Ubuntu is fine), and install virtualbox on the machine.
First I export these environment variables, then run the start.sh script:
export K8S=1
export NWORKERS=2
export VM_MEMORY=4096
export NETNEXT=true
export NO_BUILD=1
./contrib/vagrant/start.sh
It will start one master node and two worker nodes in the cluster, you can use the following command to check vm status and ssh into the cluster node.
vagrant status
vagrant ssh <node-name>
Inside the node /home/vagrant/go/src/github.com/cilium/cilium
is mounted as ssh client to the cilium
root folder
in your machine, so any change to your codebase will be here in the VM as well. Very convenient. I recommend building
from host machine. Building within the dev machine doesn't work (I have lock fs problem in a nfs client).
# in VM
sudo make install
sudo make install-bpf
To kick off the e2e test:
cd test
sudo NETNEXT=1 KUBEPROXY=0 K8S_NODES=3 NO_CILIUM_ON_NODE="k8s3" ginkgo -v --focus="K8sEgressGatewayTest" -- -cilium.provision=true -cilium.testScope="k8s" -cilium.holdEnvironment=true -cilium.skipLogs=true
When the test failed, it will hold the process and the environment for you to debug.
KUBEPROXY=0 K8S_NODES=1 ginkgo1 -v --focus="K8sDatapathVerifier" -- -cilium.provision=true -cilium.testScope="k8s" -cilium.holdEnvironment=true -cilium.skipLogs=true