Project

General

Profile

Actions

action #26080

closed

[sle][functional] zypper_lifecycle fails because of (maybe?) broken regex

Added by nicksinger about 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Bugs in existing tests
Target version:
-
Start date:
2017-10-16
Due date:
2017-11-22
% Done:

0%

Estimated time:
Difficulty:

Description

Observation

openQA test in scenario sle-15-Installer-DVD-aarch64-lvm@aarch64 fails in
zypper_lifecycle.

This happened most likely because some regex could not be matched on the content of /etc/products.d/$prod.prod (according to /var/lib/openqa/share/tests/sle/tests/console/zypper_lifecycle.pm).
It is kind of hard to judge if this is a product or a test issue since the test does not really mention what eh expects here so further investigation is definitely needed (therefore the "Urgent" prio).

Also some more feedback for the reviewer would be desirable especially in this magic for-loop starting in #83.

Reproducible

Fails since (at least) Build 288.8

Expected result

Last good: (unknown) (or more recent)

Further details

Always latest result in this scenario: latest


Related issues 1 (0 open1 closed)

Related to openQA Tests (public) - action #26112: [sle][functional] test fails in zypper_lifecycle - bash script failsRejected2017-10-172018-02-13

Actions
Actions #1

Updated by okurz about 7 years ago

  • Due date set to 2017-11-08
Actions #2

Updated by okurz about 7 years ago

  • Related to action #26112: [sle][functional] test fails in zypper_lifecycle - bash script fails added
Actions #4

Updated by mgriessmeier about 7 years ago

  • Status changed from New to In Progress
  • Assignee set to mgriessmeier
  • Priority changed from Urgent to Normal

anyway, I'll try to improve user feedback but lowering prio

Actions #5

Updated by mgriessmeier about 7 years ago

  • Status changed from In Progress to Feedback

actually, user feedback is totally fine because L91 says exactly whats the issue here

 85     for my $l (split /\n/, $overview) {
 86         if ($l =~ /$product_name\s*(\S*)/) {
 87             $product_eol = $1;
 88             last;
 89         }
 90     }
 91     die "baseproduct eol not found in overview" unless $product_eol;

BUT, for some reason it didn't match in the example:
overview shows eol for the product: https://openqa.suse.de/tests/1212584#step/zypper_lifecycle/6
and the product found matches the product from overview: https://openqa.suse.de/tests/1212584#step/zypper_lifecycle/55

As already stated, it worked in the latest build... so let's consider this as temporary black perl magic?
I have no clue how we can make this for loop more robust

Although I've added one better feedback message if there is not product found in the product file, see https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/3826
setting to feedback until PR is merged

Actions #6

Updated by okurz about 7 years ago

  • Status changed from Feedback to In Progress

merged

Actions #7

Updated by mgriessmeier about 7 years ago

  • Status changed from In Progress to Resolved

marking as resolved then

Actions #8

Updated by mgriessmeier about 7 years ago

  • Status changed from Resolved to In Progress

seems to happen more and more often, though still sporadic:
https://openqa.suse.de/tests/1241707#step/zypper_lifecycle/58

reopening anyway because we might want to improve the debug messages even more

Actions #9

Updated by mgriessmeier about 7 years ago

  • Status changed from In Progress to Resolved

added output to see which product was actually found e.g. what the regex returns:
http://opeth.suse.de/tests/5824#step/zypper_lifecycle/57

see https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/3867

closed again

Actions #10

Updated by mgriessmeier about 7 years ago

  • Status changed from Resolved to In Progress

with the additional debug output we now know what's the issue:

the regex matches to much, see https://openqa.suse.de/tests/1244046#step/zypper_lifecycle/58

Product found in overview: Welcome to SUSE Linux Enterprise Server 15 Beta2 (aarch64) - Kernel 4.12.14-2.4-default (ttyAMA0).

 enp0s3: 10.0.2.15 fec0::893d:c444:8f22:a588


 SUSE Linux Enterprise Server 15

That's why it cannot find the correct product.

I will fix the regex accordingly now

Actions #11

Updated by mgriessmeier about 7 years ago

Fixed by explicitly assigning the matched regex to the $product_name variable to prevent multi_line return value from script_output
Ticket about broken script_output will be opened.

see verification run:
opeth.suse.de/tests/5829#step/zypper_lifecycle/57

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

Actions #12

Updated by mgriessmeier about 7 years ago

  • Status changed from In Progress to Feedback
Actions #13

Updated by mgriessmeier about 7 years ago

  • Due date changed from 2017-11-08 to 2017-11-22

merged https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/3877
waiting for production verification, moving to next sprint

Actions #14

Updated by okurz about 7 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF