Project

General

Profile

action #91488

containers: openqa test "single_container_webui" eventually fails

Added by ilausuch 3 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Concrete Bugs
Target version:
Start date:
2021-04-21
Due date:
% Done:

0%

Estimated time:
Difficulty:

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:

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

Related issues

Related to openQA Project - action #91818: containers: Add logs when docker-compose up fails in the CINew2021-04-27

History

#1 Updated by ilausuch 3 months ago

  • Assignee set to ilausuch

#2 Updated by cdywan 3 months 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 🤔️

#3 Updated by ilausuch 3 months 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

#4 Updated by ilausuch 3 months 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

#5 Updated by ilausuch 3 months 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

#6 Updated by okurz 3 months ago

  • Target version set to Ready

#7 Updated by ilausuch 3 months ago

  • Related to action #91818: containers: Add logs when docker-compose up fails in the CI added

#8 Updated by cdywan 3 months 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?

#9 Updated by ilausuch 2 months 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
[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

#10 Updated by ilausuch 2 months 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.

Also available in: Atom PDF