action #91488
closedcontainers: openqa test "single_container_webui" eventually fails
Description
Motivation¶
Sometimes we could see this error
Error: No such container: openqa_webui
This is because the docker run has executed without problems, but one moment later the container doesn't exist
assert_script_run("docker run --rm -d --network testing $volumes $certificates -p 80:80 --name openqa_webui openqa_webui");
wait_for_container_log("openqa_webui", "Web application available at", "docker");
Examples:
- https://openqa.opensuse.org/tests/1706491#step/single_container_webui/10
- https://openqa.opensuse.org/tests/1706479#step/single_container_webui/10
We don't have information to know what is the problem
Acceptance Criteria¶
- AC 1: Log information when this crashes
- AC 2: Fix the problem
Updated by livdywan over 3 years ago
Maybe we can extend wait_for_container_log to show all logs in case of a failure? To see if the container got deleted, crashed or whatever 🤔️
Updated by ilausuch over 3 years ago
Yes, this a good approach too, but the problem is that in this case without removing -rm if it fails then the container is removed and its logs too
I had prepared this https://github.com/os-autoinst/os-autoinst-distri-openQA/pull/67
Updated by ilausuch over 3 years ago
An alternative idea, we also could use a volume for logs
-v logs:/var/log
This is not removed when the container is removed
Updated by ilausuch over 3 years ago
- Status changed from New to Feedback
The https://github.com/os-autoinst/os-autoinst-distri-openQA/pull/67 was merged. But this not fix the commented problems, but we will have more information next time. I keep this open until this happends
Updated by ilausuch over 3 years ago
- Related to action #91818: containers: Add logs when docker-compose up fails in the CI added
Updated by livdywan over 3 years ago
ilausuch wrote:
The https://github.com/os-autoinst/os-autoinst-distri-openQA/pull/67 was merged. But this not fix the commented problems, but we will have more information next time. I keep this open until this happends
The test results since are all green. Is this good enough?
Updated by ilausuch over 3 years ago
I detected two error cases
https://openqa.opensuse.org/tests/1739739#step/single_container_webui/107
https://openqa.opensuse.org/tests/1739750#step/single_container_webui/107
Seems that the problem is here
Mojolicious::Plugin::AssetPack::Pipe::Sass requires ruby. https://ruby-lang.org/en/documentation/installation
[0m[33m[2021-05-14T06:22:00.267 UTC] [info] ::: basetest::runtest: # Test died: output not validating at openqa/lib/utils.pm line 101.
In further tests it solves without changing the code of this test or any containers code
Updated by ilausuch over 3 years ago
- Status changed from Feedback to Resolved
Last comment could conclude that the code to print the logs to know why the container doesn't initialize is working and show us the causes of failures for this test. As all these weeks of observation only mentioned errors has detected and are not related with the code of this tests of the containers code. So we conclude we can resolve this ticket, knowing that if in the future we will know the reasons for new failures.