Skip to content

Commit

Permalink
vagrant, test: Accept NETNEXT=1 syntax
Browse files Browse the repository at this point in the history
Document NETNEXT option for the dev. VM and accept NETNEXT=1 syntax for
consistency with other options.

Signed-off-by: Paul Chaignon <paul@cilium.io>
  • Loading branch information
pchaigno committed Apr 10, 2020
1 parent bc3f202 commit 7d4be7e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions Documentation/contributing/development/dev_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ brought up by vagrant:
kube-proxy, kubectl and Cilium. When used in combination with ``NWORKERS=1`` a
second node is created, where ``k8s2`` will be a kubernetes node, which
contains: kubelet, kube-proxy, kubectl and cilium.
* ``NETNEXT=1``: Run with net-next kernel.
* ``IPV4=1``: Run Cilium with IPv4 enabled.
* ``RUNTIME=x``: Sets up the container runtime to be used inside a kubernetes
cluster. Valid options are: ``docker``, ``containerd`` and ``crio``. If not
Expand Down
2 changes: 1 addition & 1 deletion Documentation/contributing/testing/e2e.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ supported version of Kubernetes, run the test suite with the following format:

.. note::

When provisioning VMs with the net-next kernel (``NETNEXT=true``) on
When provisioning VMs with the net-next kernel (``NETNEXT=1``) on
VirtualBox which version does not match a version of the VM image
VirtualBox Guest Additions, Vagrant will install a new version of
the Additions with ``mount.vboxsf``. The latter is not compatible with
Expand Down
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ $SERVER_VERSION= (ENV['SERVER_VERSION'] || $SERVER_VERSION)
$NETNEXT_SERVER_BOX = (ENV['NETNEXT_SERVER_BOX'] || $NETNEXT_SERVER_BOX)
$NETNEXT_SERVER_VERSION= (ENV['NETNEXT_SERVER_VERSION'] || $NETNEXT_SERVER_VERSION)

if ENV['NETNEXT'] == "true"
if ENV['NETNEXT'] == "true" || ENV['NETNEXT'] == "1" then
$SERVER_BOX = $NETNEXT_SERVER_BOX
$SERVER_VERSION = $NETNEXT_SERVER_VERSION
$vm_kernel = '+'
Expand Down
2 changes: 1 addition & 1 deletion test/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if ENV['KERNEL'] != nil && ENV['KERNEL'] != ""
$SERVER_VERSION = instance_variable_get("@v"+ ENV['KERNEL'] + "_SERVER_VERSION")
end

if ENV['NETNEXT'] == "true"
if ENV['NETNEXT'] == "true" || ENV['NETNEXT'] == "1" then
$SERVER_BOX = $NETNEXT_SERVER_BOX
$SERVER_VERSION = $NETNEXT_SERVER_VERSION
end
Expand Down
3 changes: 2 additions & 1 deletion test/helpers/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,8 @@ func failIfContainsBadLogMsg(logs string, blacklist map[string][]string) {
// kernel (depending on the image, it's the latest kernel either from net-next.git
// or bpf-next.git tree), or on the > 4.19.57 kernel.
func RunsOnNetNextOr419Kernel() bool {
return os.Getenv("NETNEXT") == "true" || os.Getenv("KERNEL") == "419"
netNext := os.Getenv("NETNEXT")
return netNext == "true" || netNext == "1" || os.Getenv("KERNEL") == "419"
}

// DoesNotRunOnNetNextOr419Kernel is the complement function of
Expand Down
2 changes: 1 addition & 1 deletion test/k8sT/manifests/externalIPs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ will run with node-port feature enabled and without kube-proxy.
## Create a k8s cluster with 2 nodes *and* NFS

```bash
NETNEXT=true NFS=1 NWORKERS=1 K8S=1 ./contrib/vagrant/start.sh
NETNEXT=1 NFS=1 NWORKERS=1 K8S=1 ./contrib/vagrant/start.sh
```

the NFS is important because it makes the script to create 2 network interfaces on each VM.
Expand Down

0 comments on commit 7d4be7e

Please sign in to comment.