Actions
Bug #5928
closed[ttcn3 docker tests]: Wait for docker containers to finish
Start date:
02/28/2023
Due date:
% Done:
100%
Spec Reference:
Description
We had a test failure where
docker container kill jenkins-ttcn3-hnbgw-test-latest-245-stp
failed to actually stop before the jenkins script tries to execute the container again:
See https://jenkins.osmocom.org/jenkins/view/TTCN3/job/ttcn3-hnbgw-test-latest/245/console
Tue 28 Feb 2023 04:55:23 PM - osmith: I'd also have expected the kill command to wait until the container is killed Tue 28 Feb 2023 04:59:27 PM - dwillmann: Well, it lets you do "docker container kill -s HUP name" so I think it's just a fancy frontend for kill Tue 28 Feb 2023 05:07:03 PM - hwelte: I also thought kill is like stop waiting for the container to terminate, but I guess we all had wrong expectations Tue 28 Feb 2023 05:07:27 PM - hwelte: we can do 'docker stop -t 1' to avoid waiting 10s Tue 28 Feb 2023 05:13:04 PM - hwelte: there's also 'docker wait' Tue 28 Feb 2023 05:13:37 PM - hwelte: I guess that should certainly make sure the container is gone Tue 28 Feb 2023 05:14:04 PM - hwelte: can even wait for multiple containers in one call Tue 28 Feb 2023 05:14:54 PM - hwelte: so something like kill+wait (if that differs at all from stop) Tue 28 Feb 2023 05:15:45 PM - dwillmann: Stop does a graceful shutdown and kill if that times out (without waiting for the kill I assume)
So the best solution will probably to add a docker container wait <containers> to wait for all killed containers to actually be gone before starting those again.
This probably only applies to the builds that run the same tests multiple times with different configurations, but shouldn't matter to implement it for all.
Updated by osmith about 1 month ago
- Status changed from New to In Progress
- % Done changed from 0 to 90
Actions