Bug 1537098 - don't parse weak/rich dependencies unless the the whole list can be processed
Summary: don't parse weak/rich dependencies unless the the whole list can be processed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 580
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Kašpárek
QA Contact: Radovan Drazny
URL:
Whiteboard:
Depends On:
Blocks: sat58-errata
TreeView+ depends on / blocked
 
Reported: 2018-01-22 12:37 UTC by Tomas Lestach
Modified: 2018-03-06 15:47 UTC (History)
3 users (show)

Fixed In Version: spacewalk-backend-2.5.3-161-sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-06 15:47:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0393 0 normal SHIPPED_LIVE Red Hat Satellite 5.8.0 bug fix update 2018-03-06 20:47:01 UTC

Description Tomas Lestach 2018-01-22 12:37:09 UTC
Description of problem:
Satellite 5.8 cannot correctly parse weak/rich rpm dependencies.

Version-Release number of selected component (if applicable):
Satellite 5.8
# rpm -q spacewalk-java spacewalk-backend
spacewalk-java-2.5.14-95.el6sat.noarch
spacewalk-backend-2.5.3-151.el6sat.noarch
# rpm -qa rpm*
rpm-libs-4.8.0-55.el6.x86_64
rpm-4.8.0-55.el6.x86_64
rpm-build-4.8.0-55.el6.x86_64
rpm-python-4.8.0-55.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. check weak/rich dependencies of a package using rpm
2. check weak/rich dependencies of the same package as shown on Satellite 5 WebUI
3. compare those two

Actual results:
1.
$ rpm -qp --enhances /tmp/acme-tiny-0.1-12.20160810git5a7b4e7.fc26.noarch.rpm 
httpd
mod_ssl
nginx
$ rpm -qp --suggests /tmp/acme-tiny-0.1-12.20160810git5a7b4e7.fc26.noarch.rpm 
httpd
mod_ssl
nginx

2.
Satellite 5 WebUI shows appropriate rpm dependency sections:
Suggests
httpd

Enhances
httpd

Satellite 5 parses only the first weak/rich dependency from the list. There's no tooling available to fix this state.

Expected results:
Have either the same results of (1) and (2) or do not try to parse weak/rich dependencies at all.

Additional info:
Satellite 5.8 will be able to correctly parse the whole rpm weak/rich dependency list once Bug 1466678 is fixed. Till that time do not even try to parse the weak/rich dependency list.

Comment 2 Grant Gainey 2018-02-05 19:54:29 UTC
spacewalk.github:
8fe431e0ac2b3c4870d98aacc41bfb7c8b8f9fdd

packageImport knows how to ignore the 'new tags' on older Spacewalks, *and* old versions of RPM.

Comment 5 Radovan Drazny 2018-02-23 12:49:28 UTC
Reproduced with spacewalk-backend-2.5.3-160 using the reproducer from the initial report. While rpm  provides complete list for "suggests" and "enahances", Spacewalk WebUI shows only first item from each list, just like described.

- First scenario - updated Satellite (spacewalk-backend-2.5.3-162.el6sat), old rpm libs (rpm-4.8.0-55.el6), import a package providing "enhances"/"suggests" tags:

Checking the package details in the Satellite (package management, Dependencies tab), there are no items in Suggests nor Enhances section.


- Second scenario - updated Satellite (spacewalk-backend-2.5.3-162.el6sat), updated rpm libs (rpm-4.8.0-56.el6_9), import a package providing "enhances"/"suggests" tags:

Checking the package details in the Satellite (package management, Dependencies tab), there are all items in Suggests and Enhances sections. In case of acme-tiny-0.1-12.20160810git5a7b4e7.fc26 it means: 
 - httpd
 - mod_ssl
 - nginx
in both cases.

It is necessary to restart the Satellite after updating rpm libs, otherwise the new functionality is not working.

Basically, the functionality works as expected now, with or without updated rpm. But I see an issue with the existing data. If packages were imported using the old spacewalk-backend and old rpm, even after update, Satellite will display old incorrect data generated during the initial package import/rhnpush/reposync. It is necessary to remove the packages and do a re-import to generate the correct data. 

Grant, is there some simple way to do a package data refresh to generate the correct data, without removing and re-importing packages?

In any case, I think it would be useful to add a warning to the errata doc making user aware of the need to do a package refresh/reimport to make Satellite display correct package data.

Comment 6 Grant Gainey 2018-02-23 13:01:06 UTC
The new capabilities don't appear in RHEL until RHEL8 happens. So no Satellite user will be affected by this. If someone has, say, imported a recent Fedora, then they'll just have to bite the bullet and re-import to fix, alas. Working as intended.

Comment 7 Radovan Drazny 2018-02-23 13:15:42 UTC
(In reply to Grant Gainey from comment #6)
> The new capabilities don't appear in RHEL until RHEL8 happens. So no
> Satellite user will be affected by this. If someone has, say, imported a
> recent Fedora, then they'll just have to bite the bullet and re-import to
> fix, alas. Working as intended.

Ok. In that case, the fix works as expected.

VERIFIED

Comment 10 errata-xmlrpc 2018-03-06 15:47:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0393


Note You need to log in before you can comment on or make changes to this bug.