Project

General

Profile

Actions

action #95863

open

[qe-core] Improve conflict handling in update_install

Added by okurz almost 3 years ago. Updated almost 2 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
Category:
Enhancement to existing tests
Target version:
Start date:
2021-07-23
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Difficulty:

Description

Motivation

https://build.suse.de/request/show/243640 failed in tests like https://openqa.suse.de/tests/6481025#step/update_install/56 with

the to be installed rpm-ndb-4.14.1-29.2.x86_64 conflicts with 'rpm' provided by the installed rpm-4.14.1-29.46.x86_64

https://build.suse.de/request/show/243640#comment-3694699 already explained that the conflict should be expected. https://build.suse.de/package/view_file/SUSE:Maintenance:20166/python-rpm.SUSE_SLE-15-SP3_Update/rpm-ndb.spec?expand=1 in line 64 correctly states "Conflicts: rpm"

but the test was never adapted for that.

Notes from other people:

Jozef Pupava @dzedro
The conflict handling can't solve everything when all packages are installed at once, some can't be installed in parallel like in this case ... zypper -n in -l rpm-ndb rpm-build rpm-32bit python3-rpm rpm-devel python2-rpm rpm -> the to be installed rpm-ndb-4.14.1-29.2.ppc64le conflicts with 'rpm' provided by the installed rpm-4.14.1-29.46.ppc64le

Stephan Kulow @coolo
yes, because rpm-ndb and rpm are in conflict

Oliver Kurz @okurz
and are expected to conflict, so what to do to make the test module not fail in such case?

Jozef Pupava @dzedro
Yes, but sometimes there is kind of circle conflict between multiple packages which I could not solve
I was thinking about when there is conflict try to install packages each at the time

Marcus Meissner @msmeissn
have 2 scenarios somehow? usually rpm-ndb is only for the container images though currently so ignore rpm-ndb for egular sles, but use for 15sp3 containers?

Stephan Kulow @coolo
do we even test zypper patch within containers?

Jozef Pupava @dzedro
The test just takes all the packages in the update and tries to install them, we could somehow split it but I don't know based on what ? I don't know about zypper patch within containers, maybe QAC could know.

Stephan Kulow @coolo
... and if there are conflicts, it removes some if test whitelisted these conflicts

Acceptance criteria


Subtasks 1 (0 open1 closed)

action #95929: [qe-core] Investigate if update_install could be ran in the functional job groupRejectedapappas2021-07-23

Actions

Related issues 1 (1 open0 closed)

Copied to openQA Tests - action #113737: [qe-core] Improve conflict handling in update_install - read conflicts from the package metadata instead of a hashNew

Actions
Actions #1

Updated by okurz almost 3 years ago

Added as watchers "dzedro" as involved person as well as "apappas" as test module maintainer

Actions #2

Updated by dzedro almost 3 years ago

My idea to workaround this issue, would be something like this, to get rid of hardcoded conflict list.
In case of conflict try to install each package alone, before that remove all packages on the install list to avoid conflict between them.

http://dzedro.suse.cz/tests/18699

@@ -185,7 +185,13 @@ sub run {

     # Install binaries newly added by the incident.
     if (scalar @new_binaries) {
-        zypper_call("in -l @new_binaries", exitcode => [0, 102, 103], log => 'new.log', timeout => 1500);
+        my $zypper_ret = zypper_call("in -l @new_binaries", exitcode => [0, 4, 102, 103], log => 'new.log', timeout => 1500);
+        if ($zypper_ret == 4) {
+            zypper_call("rm @new_binaries", exitcode => [0, 104], timeout => 1500);
+            foreach (@new_binaries) {
+                zypper_call("in $_", exitcode => [0, 4, 102, 103]);
+            }
+        }
     }

Actions #3

Updated by szarate almost 3 years ago

  • Target version set to QE-Core: Ready

Perhaps Jozef's idea is a good starting point.

Actions #4

Updated by tjyrinki_suse over 2 years ago

  • Status changed from New to Workable
Actions #5

Updated by szarate over 2 years ago

  • Status changed from Workable to Feedback
  • Assignee set to szarate
  • Target version changed from QE-Core: Ready to future

Santiago to check or ask if this happened again at some point in the future, because as of today, issue seems to be gone, if somebody wants to implement the workaround.

Looks like a circular dependency problem (if an update gets two conflicting packages in the same place, the issue seems to ocurr), another common case is when two packages are conflicting with eachother and are not in the conflict map, hence the table will have to be updated (A.K.A: Deal with it.)

Actions #6

Updated by dzedro about 2 years ago

Here is example of update which is trying to install all involved packages at same time [1], but that is impossible.
I used the code above to make it pass. Each patch installed his content. [2]

[1] https://openqa.suse.de/tests/8258951#step/update_install/120
[2] https://openqa.suse.de/tests/8270651

Actions #7

Updated by dzedro about 2 years ago

Unfortunately not each patch, Just one. I will try to make it install all patches.

Actions #8

Updated by dzedro about 2 years ago

The previous piece of code kind of worked but only with one patch.
I created this PR to do whole patch process separately for each patch.
https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/14489

Actions #9

Updated by szarate almost 2 years ago

  • Copied to action #113737: [qe-core] Improve conflict handling in update_install - read conflicts from the package metadata instead of a hash added
Actions #10

Updated by szarate almost 2 years ago

  • Description updated (diff)

AC2 moved to: #113737

Actions

Also available in: Atom PDF