Project

General

Profile

Actions

action #156895

closed

test fails in podman: Can't validate output

Added by clanig 10 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
2024-03-08
Due date:
% Done:

0%

Estimated time:

Description

Observation

openQA test in scenario sle-micro-5.5-Default-Updates-x86_64-slem_containers@64bit fails in
podman

The test was previously refactored: https://github.com/os-autoinst/os-autoinst-distri-opensuse/commit/4f216c7b7
It should be checked if the refactor broke something.

Test suite description

SLE Micro as container host tests (toolbox, podman, rootless podman, podman firewall, etc).

Reproducible

Fails since (at least) Build 20240307-1 (current job)

Expected result

Last good: 20240306-1 (or more recent)

Further details

Always latest result in this scenario: latest


Related issues 2 (0 open2 closed)

Related to Containers and images - action #157000: test showing HTTP 301 error (Moved permanently)Rejectedmdati2024-03-11

Actions
Related to Containers and images - action #155404: [refactoring] Simplify basic_container_testsResolvedph03nix2024-02-13

Actions
Actions #1

Updated by clanig 10 months ago

  • Subject changed from test fails in podman: can't curl opensuse.org to test fails in podman: Can't validate output
Actions #2

Updated by mdati 10 months ago · Edited

The output [warning] of podman:
[33mWARN[0m[0000] Path "/etc/SUSEConnect" from "/etc/containers/mounts.conf" doesn't exist, skipping is
mixed to the validation output check, in https://openqa.suse.de/tests/13738138#step/podman/148:

Script:
podman run --rm --init registry.opensuse.org/opensuse/tumbleweed ps --no-headers -xo 'pid args'

Check function (deparsed code):
{
    package container_engine;
    use feature 'current_sub', 'evalbytes', 'fc', 'say', 'state', 'switch', 'unicode_strings', 'unicode_eval';
    not(($_ =~ / 1 .*ps.*/u));
}

Output:
WARN[0000] Path "/etc/SUSEConnect" from "/etc/containers/mounts.conf" doesn't exist, skipping 
    1 /run/podman-init -- ps --no-headers -xo pid args
    7 ps --no-headers -xo pid args

Error is:

Test died: output not validating at /usr/lib/os-autoinst/testapi.pm line 1229.
    testapi::validate_script_output("podman run --rm --init registry.opensuse.org/opensuse/tumblew"..., CODE(0x55ac9380c3a0)) called at sle-micro/tests/containers/container_engine.pm line 97
    container_engine::basic_container_tests("runtime", "podman") called at sle-micro/tests/containers/container_engine.pm line 134
    container_engine::run(container_engine=HASH(0x55ac9372cda8), OpenQA::Test::RunArgs=HASH(0x55ac935a9400)) called at /usr/lib/os-autoinst/basetest.pm line 348
    eval {...} called at /usr/lib/os-autoinst/basetest.pm line 346
    basetest::runtest(container_engine=HASH(0x55ac9372cda8)) called at /usr/lib/os-autoinst/autotest.pm line 415
    eval {...} called at /usr/lib/os-autoinst/autotest.pm line 415
    autotest::runalltests() called at /usr/lib/os-autoinst/autotest.pm line 272
    eval {...} called at /usr/lib/os-autoinst/autotest.pm line 272
    autotest::run_all() called at /usr/lib/os-autoinst/autotest.pm line 323
    autotest::__ANON__(Mojo::IOLoop::ReadWriteProcess=HASH(0x55ac950466e0)) called at /usr/lib/perl5/vendor_perl/5.26.1/Mojo/IOLoop/ReadWriteProcess.pm line 329
    eval {...} called at /usr/lib/perl5/vendor_perl/5.26.1/Mojo/IOLoop/ReadWriteProcess.pm line 329
    Mojo::IOLoop::ReadWriteProcess::_fork(Mojo::IOLoop::ReadWriteProcess=HASH(0x55ac950466e0), CODE(0x55ac9417e880)) called at /usr/lib/perl5/vendor_perl/5.26.1/Mojo/IOLoop/ReadWriteProcess.pm line 492
    Mojo::IOLoop::ReadWriteProcess::start(Mojo::IOLoop::ReadWriteProcess=HASH(0x55ac950466e0)) called at /usr/lib/os-autoinst/autotest.pm line 325
    autotest::start_process() called at /usr/lib/os-autoinst/OpenQA/Isotovideo/Runner.pm line 94
    OpenQA::Isotovideo::Runner::start_autotest(OpenQA::Isotovideo::Runner=HASH(0x55ac8e59cbf8)) called at /usr/bin/isotovideo line 192
    eval {...} called at /usr/bin/isotovideo line 181

BUT here the validation is detecting some process including ps and having PID=1, not wanted, however here is podman-init that is ok.

See tests/containers/container_engine.pm L#95

Actions #3

Updated by mdati 10 months ago

  • Tags changed from investigation to investigation, validation, podman
  • Status changed from New to Workable
Actions #4

Updated by mdati 10 months ago · Edited

  • Status changed from Workable to In Progress
  • Assignee set to mdati

In tests/containers/container_engine.pm L#97 the validate_script_output( ... sub { $_ !~ m/ 1 .*ps.*/ }) condition [space]1[space].* seems is detecting false-positive.

The PID=1 case shall be fixed.

Actions #6

Updated by mdati 10 months ago · Edited

PR https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/18837

Here used a new expression to state the expected process to be present with pid=1.

Actions #7

Updated by ph03nix 9 months ago

This is actually a fallout of https://progress.opensuse.org/issues/155404 and I will handle it.

Actions #8

Updated by ph03nix 9 months ago

  • Is duplicate of action #155404: [refactoring] Simplify basic_container_tests added
Actions #9

Updated by mdati 9 months ago

  • Status changed from In Progress to Resolved

This specific issue is no more occurring after pr 18837 merged.

Actions #10

Updated by mdati 9 months ago · Edited

  • Status changed from Resolved to In Progress
Actions #11

Updated by pherranz 9 months ago

  • Related to action #157000: test showing HTTP 301 error (Moved permanently) added
Actions #12

Updated by mdati 9 months ago

Actions #13

Updated by ph03nix 9 months ago

  • Is duplicate of deleted (action #155404: [refactoring] Simplify basic_container_tests)
Actions #14

Updated by ph03nix 9 months ago

  • Related to action #155404: [refactoring] Simplify basic_container_tests added
Actions #15

Updated by mdati 9 months ago · Edited

PR https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/18845
For ps output like:
1 /run/podman-init -- ps --no-headers -xo pid args
or
1 /dev/init -- ps --no-headers -xo pid args,
3 possible processes only have been defined to be matched /dev/init, /run/podman-init or /sbin/docker-init, having PID=1,
by the expression /\s*1 .*(${runtime}-|\/)init .*/ , that means:
\s* that is any or none space before number 1, then
one fixed space, then
any string sequence, followed by 2 possible OR-cases in parenthesys:
(
${runtime}, followed by a dash -, then init [ that is ${runtime}-init ]
OR
the / character only, then init [ that is /init ]
), followed by
one fixed space, then
any string sequence.

The VR test passed ok; PR merged.

Actions #16

Updated by mdati 9 months ago

  • Status changed from In Progress to Feedback
Actions #17

Updated by mdati 9 months ago

  • Status changed from Feedback to Resolved
Actions #18

Updated by ph03nix about 2 months ago

  • Tags changed from investigation, validation, podman to containers
Actions

Also available in: Atom PDF