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

Test runtime cilium in container (take two) #19310

Merged

Conversation

jrajahalme
Copy link
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 tklauser and sayboras April 2, 2022 12:41
@jrajahalme jrajahalme marked this pull request as draft April 2, 2022 12:41
@jrajahalme
Copy link
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
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
Member Author

/test-runtime

@jrajahalme
Copy link
Member Author

Fixed image references to start with "quay.io"

@jrajahalme
Copy link
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
Member Author

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

@jrajahalme
Copy link
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 <[email protected]>
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 <[email protected]>
Pass CILIUM_IMAGE and CILIUM_TAG from environment to provisioning.

Signed-off-by: Jarno Rajahalme <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
@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 <[email protected]>
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 <[email protected]>
@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