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

Dev: behave: update test container to latest tumbleweed and use knet-1.29 #1571

Merged

Conversation

nicholasyang2022
Copy link
Collaborator

@nicholasyang2022 nicholasyang2022 commented Sep 29, 2024

  • use knet-1.29 and rebuild the test container with latest tumbleweed
  • replace privileged docker containers with unprivileged podman containers
    • latest systemd in tumbleweed does no longer like to run in a privileged container. Instead it need the container runtime to setup a environment according to CONTAINER_INTERFACE1.
  • replace legacy iptables with iptables-nft
    • legacy iptables does not work in unprivileged containers
  • stop using the default bridge container network
    • ha_netowork_first and ha_network_second are enough for functional tests
    • the default bridge network makes network interface names inside the containers unstable

close #1572.

Footnotes

  1. https://systemd.io/CONTAINER_INTERFACE/

Copy link

codecov bot commented Sep 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.55%. Comparing base (0573690) to head (f837d86).

Additional details and impacted files
Flag Coverage Δ
integration 54.31% <ø> (+<0.01%) ⬆️
unit 52.56% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nicholasyang2022 nicholasyang2022 force-pushed the funtional-test-knet-1.29 branch 18 times, most recently from fcd69a8 to c159dc9 Compare October 17, 2024 05:26
@nicholasyang2022 nicholasyang2022 changed the title use knet-1.29 image Dev: behave: updated test container to latest tumbleweed and use knet-1.29 image Oct 17, 2024
@nicholasyang2022 nicholasyang2022 changed the title Dev: behave: updated test container to latest tumbleweed and use knet-1.29 image Dev: behave: update test container to latest tumbleweed and use knet-1.29 image Oct 17, 2024
@nicholasyang2022 nicholasyang2022 changed the title Dev: behave: update test container to latest tumbleweed and use knet-1.29 image Dev: behave: update test container to latest tumbleweed and use knet-1.29 Oct 17, 2024
@nicholasyang2022 nicholasyang2022 marked this pull request as ready for review October 17, 2024 06:00
@liangxin1300
Copy link
Collaborator

liangxin1300 commented Oct 17, 2024

Please cleanup unused info while running run-functional-tests with -d option, and it'd better to add

INFO: Cleanup container "xxx"...

This PR:

# ./test/run-functional-tests -d
hanode2
hanode1
INFO: Cleanup ha specific container network "ha_network_first"...
ha_network_first
INFO: Cleanup ha specific container network "ha_network_second"...
ha_network_second

Current code:

# ./test/run-functional-tests -d
INFO: Cleanup container "hanode1"...
INFO: Cleanup container "hanode2"...
INFO: Cleanup ha specific docker network "ha_network_first"...
INFO: Cleanup ha specific docker network "ha_network_second"...

And the ha_network_first ha_network_second and these long commit string, should be cleaned up

# ./test/run-functional-tests 1
INFO: Loading container image docker.io/nyang23/haleap:knet-1.29...
INFO: Create ha specific container network "ha_network_first"...
ha_network_first
INFO: Create ha specific container network "ha_network_second"...
ha_network_second
INFO: Deploying "hanode1"...
INFO: Deploying "hanode2"...
INFO: Deploying "hanode3"...
b8cdaf2aff4741d34d72b3bcac1bc6bcb330807a81a9d37b549607b5c97e779e
f34f183f577f35881a300897196749ed401d9f1a240f16711a3b6fbd3e9dfb86
2e990e87ebb45880246ca5d07d6a47e741505467a1553891d39bb18824be98d2

@liangxin1300
Copy link
Collaborator

When I manually run # ./test/run-functional-tests <test_num>, it seems the process can't be killed by Ctrl+C? Which works in current master code

@nicholasyang2022
Copy link
Collaborator Author

When I manually run # ./test/run-functional-tests <test_num>, it seems the process can't be killed by Ctrl+C? Which works in current master code

This seems to be related to the pseudo tty implementation provided by podman exec -t. The tty does not generate a SIGINT on ^C.

Sending SIGINT to the podman exec prcoess (kill -SIGINT <PID>), or sending SIGINT to the process group of run-functional-test bash process (kill -SIGINT -<PGID>) will terminate the process.

@nicholasyang2022
Copy link
Collaborator Author

Please cleanup unused info while running run-functional-tests with -d option, and it'd better to add

And the ha_network_first ha_network_second and these long commit string, should be cleaned up

Changed. Instead of redirect all the outputs to /dev/null, I redirects stdout only, so that we will know what happens when it fails.

@nicholasyang2022
Copy link
Collaborator Author

@liangxin1300 ping

… docker containers (ClusterLabs#1572)

Systemd does not like to run in privileged containers any long. Running
it in a privileged container will mess up both the host and the
container.

Instead, systemd need the container runtime to setup an environment
according to https://systemd.io/CONTAINER_INTERFACE/. Podman is able to
do this.
podman has 2 different operating mode: rootful and rootless. We runs the
functional tests in rootful mode.
The default bridged network interfere the tests. Specify a --network on
`podman run` to get rid of it.
…1572)

as legacy iptables does not work in unprivilged containers
@liangxin1300
Copy link
Collaborator

Thanks for the great work!

@liangxin1300 liangxin1300 merged commit 64b8a19 into ClusterLabs:master Oct 28, 2024
28 of 30 checks passed
@nicholasyang2022 nicholasyang2022 deleted the funtional-test-knet-1.29 branch October 28, 2024 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

systemd startup takes 30s in test container image built with latest opensuse tumbleweed
2 participants