Skip to content

Test runtime cilium in container (take two)#19310

Merged
nbusseneau merged 4 commits intocilium:masterfrom
jrajahalme:test-runtime-cilium-in-container-take-two
Apr 7, 2022
Merged

Test runtime cilium in container (take two)#19310
nbusseneau merged 4 commits intocilium:masterfrom
jrajahalme:test-runtime-cilium-in-container-take-two

Conversation

@jrajahalme
Copy link
Copy Markdown
Member

@jrajahalme jrajahalme commented Apr 2, 2022

Run Cilium in docker container for the Runtime tests. This is needed so that cilium-envoy built on Ubuntu 20.04 runs also on earlier versions when the correct version of libc is in the container image.

This version keeps the systemd cilium.service, but uses a new script to run Cilium from a docker container from there within Runtime tests. This design has a high degree of compatibility to the prior running cilium-agent directly from cilium.docker.

Test scripts are organised so that there is no change when running CIlium in a development VM. There cilium-agent is still run in the host as before.

While working with this I noticed that CIlium operator fails to run in Runtime tests as it now assumes to be able to reach k8s api-server. Because of this it is pointless to deploy cilium-operator for runtime tests. CIlium agent fails after a while due to this if it is using etcd kvstore as the heartbeats are missing. That's why the kvstore needs to return to the default (consul) configuration after the etcd test. Previously this was done after each test, but now this is done after all (two) of the kvstore tests, speeding up the tests a bit.

Fixes: #18919

@jrajahalme jrajahalme added area/CI Continuous Integration testing issue or flake release-note/misc This PR makes changes that have no direct user impact. labels Apr 2, 2022
@jrajahalme jrajahalme requested review from a team as code owners April 2, 2022 12:41
@jrajahalme jrajahalme requested review from sayboras and tklauser April 2, 2022 12:41
@jrajahalme jrajahalme marked this pull request as draft April 2, 2022 12:41
@jrajahalme
Copy link
Copy Markdown
Member Author

/test-runtime

@jrajahalme jrajahalme force-pushed the test-runtime-cilium-in-container-take-two branch from a632c14 to 11186e3 Compare April 2, 2022 12:52
@jrajahalme
Copy link
Copy Markdown
Member Author

/test-runtime

@jrajahalme jrajahalme force-pushed the test-runtime-cilium-in-container-take-two branch from 11186e3 to 25a7188 Compare April 2, 2022 20:55
@jrajahalme
Copy link
Copy Markdown
Member Author

/test-runtime

@jrajahalme
Copy link
Copy Markdown
Member Author

Fixed image references to start with "quay.io"

@jrajahalme
Copy link
Copy Markdown
Member Author

/test-runtime

@jrajahalme jrajahalme force-pushed the test-runtime-cilium-in-container-take-two branch from 7d5f689 to 269ff08 Compare April 4, 2022 12:40
@jrajahalme
Copy link
Copy Markdown
Member Author

Noticed that test/provision/install.sh sets DOCKER_REGISTRY=docker.io so had to revert adding quay.io...

@jrajahalme
Copy link
Copy Markdown
Member Author

/test-runtime

Runtime tests do not need images used by k8s tests, nor do k8s tests need
images used by runtime tests. Pull images only for the test suite in use.

Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
Run Cilium in docker container for the Runtime tests.  Keep the systemd
cilium.service, but uses a new script to run Cilium from a docker
container from there. This design has a high degree of compatibility to
the prior running cilium-agent directly from cilium.docker.

Test scripts are organized so that there is no change when running CIlium
in a development VM. There cilium-agent is still run in the host as
before.

While working with this I noticed that CIlium operator fails to run in
Runtime tests as it now assumes to be able to reach k8s
api-server. CIlium agent fails after a while due to this if it is using
etcd kvstore as the heartbeats are missing. That's why the kvstore needs
to return to the default (consul) configuration after the etcd
test. Previously this was done after each test, but now this is done
after all (two) of the kvstore tests, speeding up the tests a bit.

Do not pass explicit options when they are the same as defaults. This
also avoids using systemd template where bare Cilium agent options are
expected.

Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
Pass CILIUM_IMAGE and CILIUM_TAG from environment to provisioning.

Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
Add support for passing VMUSER (which defaults to vagrant) to ease
running tests in non-vagrant VMs.

Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
@jrajahalme jrajahalme force-pushed the test-runtime-cilium-in-container-take-two branch from 269ff08 to c3af894 Compare April 4, 2022 15:36
@jrajahalme jrajahalme marked this pull request as ready for review April 4, 2022 15:37
@jrajahalme jrajahalme added backport-pending/1.9 and removed needs-backport/1.9 ready-to-merge This PR has passed all tests and received consensus from code owners to merge. labels Apr 8, 2022
jrajahalme added a commit to jrajahalme/cilium that referenced this pull request Apr 9, 2022
[ upstream commit 262ac5f ]

Add space between provided and default args.

Fixes: cilium#19310
Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
jrajahalme added a commit to jrajahalme/cilium that referenced this pull request Apr 9, 2022
[ upstream commit 262ac5f ]

Add space between provided and default args.

Fixes: cilium#19310
Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
jrajahalme added a commit to jrajahalme/cilium that referenced this pull request Apr 9, 2022
[ upstream commit 262ac5f ]

Add space between provided and default args.

Fixes: cilium#19310
Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
jrajahalme added a commit to jrajahalme/cilium that referenced this pull request Apr 12, 2022
[ upstream commit 262ac5f ]

Add space between provided and default args.

Fixes: cilium#19310
Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
jrajahalme added a commit to jrajahalme/cilium that referenced this pull request Apr 12, 2022
[ upstream commit 262ac5f ]

Add space between provided and default args.

Fixes: cilium#19310
Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
nbusseneau pushed a commit that referenced this pull request Apr 12, 2022
[ upstream commit 262ac5f ]

Add space between provided and default args.

Fixes: #19310
Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Apr 12, 2022
nbusseneau pushed a commit that referenced this pull request Apr 13, 2022
[ upstream commit 262ac5f ]

Add space between provided and default args.

Fixes: #19310
Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
tklauser pushed a commit that referenced this pull request Apr 13, 2022
[ upstream commit 262ac5f ]

Add space between provided and default args.

Fixes: #19310
Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
@tklauser tklauser added backport-done/1.11 The backport for Cilium 1.11.x for this PR is done. and removed backport-pending/1.11 labels Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/CI Continuous Integration testing issue or flake backport-done/1.11 The backport for Cilium 1.11.x for this PR is done. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: v1.9/v1.10/v1.11: runtime job is broken

5 participants