Project

General

Profile

Actions

action #42845

closed

[sle][migration][sle12sp4] test fails in snapper rollback -- error excuting command: SUSEConnect -s

Added by tinawang123 over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Bugs in existing tests
Target version:
-
Start date:
2018-10-24
Due date:
% Done:

0%

Estimated time:
Difficulty:

Description

It looks like script issue for snapper rollback rather than a bug. Restart cases several times and it is same.
I checked with ppc64le manually. It cannot reproduce.

Actions #1

Updated by tinawang123 over 5 years ago

Observation

openQA test in scenario sle-12-SP4-Server-DVD-ppc64le-om_proxyscc_sles12sp1_allpatterns_minimal_patch_by_yast_ppc@ppc64le fails in
snapper_rollback

Reproducible

Fails since (at least) Build 0298

Expected result

Last good: (unknown) (or more recent)

Further details

Always latest result in this scenario: latest

Actions #2

Updated by leli over 5 years ago

Already filed bsc#1113435 - [Build 0443] openQA test fails in snapper_rollback - Invalid repository URL after zypper rollback

Actions #3

Updated by sunyan over 5 years ago

  • Assignee set to ZejinXu
Actions #4

Updated by ZejinXu over 5 years ago

  • Status changed from New to In Progress

How this Happened

In ALL online migration tests using proxy scc, all the repo urls were changed into invalid ones containing Build Number before migration. Very soom after urls were changed, Snapper automatically creates the 'before migration' snapshot, which will be booted into in module 'snapper_rollback'. After booted into that snapshot, In the last step of test module 'snapper_rollback'(https://openqa.suse.de/tests/2202943/modules/snapper_rollback/steps/1/src), command 'check_rollback_system' will be executed; then in this command the Python script(https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/data/console/check_registration_status.py) will be run. The Python script is actually a wrapper, it only runs one command 'SUSEConnect -s' and serialize the JSON data (stdout) of it.

However, when repo urls are invalid ones, the stdout of the command will be an error message in XML format, which is the output of the subsequently called command 'zypper --no-refresh --xmlout --non-interactive products -i'. In this case, line #31 of the Python script(https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/2d9e25b2a6d9a11f880cac16b242a3b5d28cd1f1/data/console/check_registration_status.py#L31) will raise a ValueError.

The error then causes the script to exit, and hence make this test fail.

About Other Passed Tests

As stated before, In ALL online migration tests on EVERY architecture, repo urls were changed into invalid ones. Although only this one failed in command 'SUSEConnect -s', there were actually abnormal behaviors in other tests. Namely, there will be three behaviors:

  1. Show error message after booted. https://openqa.suse.de/tests/2235891#step/snapper_rollback/15
  2. Show error message while activating 'Rollback Helper'(rollback.service). https://openqa.suse.de/tests/2242162#step/snapper_rollback/36
  3. Pass the test quietly.

The Cause

I'm still confused about the root cause. However it could be very possible that Snapper, 'rollback.service', and 'SUSEConnect -s' command are not designed to deal with SCC proxy, so they had unpredictable behaviors.

Conclusion

However, whatever the cause is, these uncommon behaviors would only happen while using SCC proxy, which means the customer won't be bothered by it. Therefore, I suggest workaround here.

Another Minor Error Concerning Py2 && Py3

In line #151 of 'migration.pm'(https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/2d9e25b2a6d9a11f880cac16b242a3b5d28cd1f1/lib/migration.pm#L151), the script is executed using the default Python interpreter, which is Python2. However, the script check_rollback_system is in Python3, it should be piped to python3 instead (https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/2d9e25b2a6d9a11f880cac16b242a3b5d28cd1f1/lib/migration.pm#L151)

Actions #5

Updated by ZejinXu over 5 years ago

  • Status changed from In Progress to Resolved

I have submitted PR#6209 (https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/6209) to fix this about a month ago. However, after that, some tests including this one in Build 0456 was not able to correctly boot up, so my verification was postponed. Later, the proxy repositories was no longer available at https://openqa.suse.de/assets/repo/, making it impossible to reproduce this bug.

Nevertheless, my submitted PR has been merged for about a month too, and it has been functioning well on normal tests and won't cause test to fail. As in osd:
https://openqa.suse.de/tests/2333216#step/snapper_rollback/46
https://openqa.suse.de/tests/2285278#step/snapper_rollback/38
https://openqa.suse.de/tests/2285692#step/snapper_rollback/41

Therefore, I'm closing this poo.

Actions

Also available in: Atom PDF