Bug 1742208

Summary: package profile upload seems to be broken on RHEL7.7
Product: Red Hat Enterprise Linux 7 Reporter: Chris Snyder <csnyder>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.7CC: cdonnell, cww, egolov, jgalipea, jsefler, mmccune, paji, pstehlik, rdrazny, satellite6-bugs
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.24.15-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1741577
: 1742822 1743120 1754859 (view as bug list) Environment:
Last Closed: 2020-03-31 19:40:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1741577, 1742822, 1743120, 1754859    

Comment 7 Craig Donnelly 2019-09-17 18:07:19 UTC
Verifying against sub-man included in RHEL-7.8-20190912.3:

[root@dhcp-8-30-55 ~]# rpm -q subscription-manager
subscription-manager-1.24.17-1.el7.x86_64

[root@dhcp-8-30-55 ~]# rpm -qa | grep katello
katello-ca-consumer-rhel8dr-sat65.usersys.redhat.com-1.0-1.noarch

^ No agent/host-tools installed.

[root@dhcp-8-30-55 ~]# subscription-manager config | grep profile
   package_profile_on_trans = 1
   report_package_profile = [1]

[root@dhcp-8-30-55 ~]# yum list httpd --showduplicates
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Available Packages
httpd.x86_64                                   2.4.6-17.el7                                        rhel-7-server-rpms
httpd.x86_64                                   2.4.6-18.el7_0                                      rhel-7-server-rpms
httpd.x86_64                                   2.4.6-19.el7_0                                      rhel-7-server-rpms
httpd.x86_64                                   2.4.6-31.el7                                        rhel-7-server-rpms
httpd.x86_64                                   2.4.6-31.el7_1.1                                    rhel-7-server-rpms
httpd.x86_64                                   2.4.6-40.el7                                        rhel-7-server-rpms
httpd.x86_64                                   2.4.6-40.el7_2.1                                    rhel-7-server-rpms
httpd.x86_64                                   2.4.6-40.el7_2.4                                    rhel-7-server-rpms
httpd.x86_64                                   2.4.6-45.el7                                        rhel-7-server-rpms
httpd.x86_64                                   2.4.6-45.el7_3.4                                    rhel-7-server-rpms
httpd.x86_64                                   2.4.6-67.el7                                        rhel-7-server-rpms
httpd.x86_64                                   2.4.6-67.el7_4.2                                    rhel-7-server-rpms
httpd.x86_64                                   2.4.6-67.el7_4.5                                    rhel-7-server-rpms
httpd.x86_64                                   2.4.6-67.el7_4.6                                    rhel-7-server-rpms
httpd.x86_64                                   2.4.6-80.el7                                        rhel-7-server-rpms
httpd.x86_64                                   2.4.6-80.el7_5.1                                    rhel-7-server-rpms
httpd.x86_64                                   2.4.6-88.el7                                        rhel-7-server-rpms
httpd.x86_64                                   2.4.6-89.el7_6                                      rhel-7-server-rpms
httpd.x86_64                                   2.4.6-89.el7_6.1                                    rhel-7-server-rpms
httpd.x86_64                                   2.4.6-90.el7                                        rhel-7-server-rpms
[root@dhcp-8-30-55 ~]# yum install httpd-2.4.6-17.el7
Loaded plugins: product-id, search-disabled-repos, subscription-manager
rhel-7-server-rpms                                                                            | 2.0 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-17.el7 will be installed
--> Processing Dependency: httpd-tools = 2.4.6-17.el7 for package: httpd-2.4.6-17.el7.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-17.el7.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-17.el7.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-17.el7.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-5.el7 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package httpd-tools.x86_64 0:2.4.6-17.el7 will be installed
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================
 Package                   Arch                 Version                       Repository                        Size
=====================================================================================================================
Installing:
 httpd                     x86_64               2.4.6-17.el7                  rhel-7-server-rpms               1.2 M
Installing for dependencies:
 apr                       x86_64               1.4.8-5.el7                   rhel-7-server-rpms               104 k
 apr-util                  x86_64               1.5.2-6.el7                   rhel-7-server-rpms                92 k
 httpd-tools               x86_64               2.4.6-17.el7                  rhel-7-server-rpms                77 k
 mailcap                   noarch               2.1.41-2.el7                  rhel-7-server-rpms                31 k

Transaction Summary
=====================================================================================================================
Install  1 Package (+4 Dependent packages)

Total download size: 1.5 M
Installed size: 4.3 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7Server/rhel-7-server-rpms/packages/apr-1.4.8-5.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Public key for apr-1.4.8-5.el7.x86_64.rpm is not installed
(1/5): apr-1.4.8-5.el7.x86_64.rpm                                                             | 104 kB  00:00:01     
(2/5): apr-util-1.5.2-6.el7.x86_64.rpm                                                        |  92 kB  00:00:01     
(3/5): httpd-tools-2.4.6-17.el7.x86_64.rpm                                                    |  77 kB  00:00:00     
(4/5): httpd-2.4.6-17.el7.x86_64.rpm                                                          | 1.2 MB  00:00:00     
(5/5): mailcap-2.1.41-2.el7.noarch.rpm                                                        |  31 kB  00:00:00     
---------------------------------------------------------------------------------------------------------------------
Total                                                                                473 kB/s | 1.5 MB  00:00:03     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Importing GPG key 0xFD431D51:
 Userid     : "Red Hat, Inc. (release key 2) <security>"
 Fingerprint: 567e 347a d004 4ade 55ba 8a5f 199e 2f91 fd43 1d51
 Package    : redhat-release-server-7.8-1.el7.x86_64 (@anaconda/7.8)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Is this ok [y/N]: y
Importing GPG key 0x2FA658E0:
 Userid     : "Red Hat, Inc. (auxiliary key) <security>"
 Fingerprint: 43a6 e49c 4a38 f4be 9abf 2a53 4568 9c88 2fa6 58e0
 Package    : redhat-release-server-7.8-1.el7.x86_64 (@anaconda/7.8)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Is this ok [y/N]: y 
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : apr-1.4.8-5.el7.x86_64                                                                            1/5 
  Installing : apr-util-1.5.2-6.el7.x86_64                                                                       2/5 
  Installing : httpd-tools-2.4.6-17.el7.x86_64                                                                   3/5 
  Installing : mailcap-2.1.41-2.el7.noarch                                                                       4/5 
  Installing : httpd-2.4.6-17.el7.x86_64                                                                         5/5 
Loaded plugins: product-id, subscription-manager
  Verifying  : apr-1.4.8-5.el7.x86_64                                                                            1/5 
  Verifying  : mailcap-2.1.41-2.el7.noarch                                                                       2/5 
  Verifying  : httpd-tools-2.4.6-17.el7.x86_64                                                                   3/5 
  Verifying  : apr-util-1.5.2-6.el7.x86_64                                                                       4/5 
  Verifying  : httpd-2.4.6-17.el7.x86_64                                                                         5/5 
rhel-7-server-rpms/7Server/x86_64/productid                                                   | 2.1 kB  00:00:00     

Installed:
  httpd.x86_64 0:2.4.6-17.el7                                                                                        

Dependency Installed:
  apr.x86_64 0:1.4.8-5.el7             apr-util.x86_64 0:1.5.2-6.el7        httpd-tools.x86_64 0:2.4.6-17.el7       
  mailcap.noarch 0:2.1.41-2.el7       

Complete!


======= Data from sat 6.5.2 following install:

[root@rhel8dr-sat65 ~]# hammer host errata list --host dhcp-8-30-55.lab.eng.rdu2.redhat.com
-----|----------------|-------------|------------------------------------------------------|------------
ID   | ERRATUM ID     | TYPE        | TITLE                                                | INSTALLABLE
-----|----------------|-------------|------------------------------------------------------|------------
5003 | RHSA-2019:2343 | security    | Moderate: httpd security and bug fix update          | true       
5125 | RHSA-2019:1898 | security    | Low: httpd security update                           | true       
4940 | RHBA-2019:0812 | bugfix      | httpd bug fix update                                 | true       
3291 | RHBA-2018:3211 | bugfix      | httpd bug fix and enhancement update                 | true       
2655 | RHBA-2018:1993 | bugfix      | httpd bug fix update                                 | true       
962  | RHBA-2018:0826 | bugfix      | httpd bug fix update                                 | true       
2833 | RHBA-2017:2949 | bugfix      | httpd bug fix update                                 | true       
1538 | RHSA-2017:2882 | security    | Moderate: httpd security update                      | true       
2518 | RHSA-2017:2479 | security    | Important: httpd security update                     | true       
2922 | RHBA-2017:2175 | bugfix      | httpd bug fix update                                 | true       
3771 | RHSA-2017:0906 | security    | Moderate: httpd security and bug fix update          | true       
1565 | RHEA-2016:2534 | enhancement | httpd bug fix and enhancement update                 | true       
2003 | RHSA-2016:1422 | security    | Important: httpd security and bug fix update         | true       
473  | RHBA-2016:1045 | bugfix      | httpd bug fix update                                 | true       
2459 | RHBA-2015:2194 | bugfix      | httpd bug fix and enhancement update                 | true       
889  | RHSA-2015:1667 | security    | Moderate: httpd security update                      | true       
909  | RHSA-2015:0325 | security    | Low: httpd security, bug fix, and enhancement update | true       
537  | RHBA-2015:0029 | bugfix      | httpd bug fix update                                 | true       
2697 | RHSA-2014:0921 | security    | Important: httpd security update                     | true       
-----|----------------|-------------|------------------------------------------------------|------------

** Errata are shown in WebUI as well.

Tasks were created and run for profile upload as well as applicability following the install:

Generate applicability 	stopped 	success 	2019-09-17 12:23:08 -0400 	2019-09-17 12:23:09 -0400 	foreman_admin
Update for host dhcp-8-30-55.lab.eng.rdu2.redhat.com 	stopped 	success 	2019-09-17 12:23:07 -0400 	2019-09-17 12:23:08 -0400 	foreman_admin
Combined Profile Update for dhcp-8-30-55.lab.eng.rdu2.redhat.com 	stopped 	success 	2019-09-17 12:23:06 -0400 	2019-09-17 12:23:09 -0400 	foreman_admin

VERIFIED.

Comment 8 Craig Donnelly 2019-09-18 01:05:40 UTC
Additional testing to verify same compose above against Customer Portal package profile upload and errata applicability:

[root@dhcp-8-30-55 rhsm]# subscription-manager config | grep host
   hostname = [subscription.rhsm.redhat.com]

[root@dhcp-8-30-55 rhsm]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Mismatched
- The requested role "Red Hat Enterprise Linux Server" is not provided by a currently consumed subscription.
- The requested usage preference "Production" is not provided by a currently consumed subscription.

[root@dhcp-8-30-55 rhsm]# rpm -q subscription-manager httpd
subscription-manager-1.24.17-1.el7.x86_64
httpd-2.4.6-17.el7.x86_64

<<<<< Currently shown package profile in production portal for httpd:

Package	Summary	Advisories
httpd-2.4.6-17.el7.x86_64.rpm	Apache HTTP Server	

    RHBA-2018:0826
    RHSA-2017:2882
    RHSA-2015:1667

Showing 1 – 3 of 19  <<<<<<<<<<------------------ 19 errata involving httpd.

Available Package upgrades on system:

[root@dhcp-8-30-55 rhsm]# yum list httpd --showduplicates
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Installed Packages
httpd.x86_64                                   2.4.6-17.el7                                       @rhel-7-server-rpms
Available Packages
httpd.x86_64                                   2.4.6-17.el7                                       rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-18.el7_0                                     rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-19.el7_0                                     rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-31.el7                                       rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-31.el7_1.1                                   rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-40.el7                                       rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-40.el7_2.1                                   rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-40.el7_2.4                                   rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-45.el7                                       rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-45.el7_3.4                                   rhel-7-server-rpms <<<<<<<------ target
httpd.x86_64                                   2.4.6-67.el7                                       rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-67.el7_4.2                                   rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-67.el7_4.5                                   rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-67.el7_4.6                                   rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-80.el7                                       rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-80.el7_5.1                                   rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-88.el7                                       rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-89.el7_6                                     rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-89.el7_6.1                                   rhel-7-server-rpms 
httpd.x86_64                                   2.4.6-90.el7                                       rhel-7-server-rpms

[root@dhcp-8-30-55 rhsm]# yum update httpd-2.4.6-45.el7_3.4
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-17.el7 will be updated
---> Package httpd.x86_64 0:2.4.6-45.el7_3.4 will be an update
--> Processing Dependency: httpd-tools = 2.4.6-45.el7_3.4 for package: httpd-2.4.6-45.el7_3.4.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.4.6-17.el7 will be updated
---> Package httpd-tools.x86_64 0:2.4.6-45.el7_3.4 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================
 Package                  Arch                Version                          Repository                       Size
=====================================================================================================================
Updating:
 httpd                    x86_64              2.4.6-45.el7_3.4                 rhel-7-server-rpms              1.2 M
Updating for dependencies:
 httpd-tools              x86_64              2.4.6-45.el7_3.4                 rhel-7-server-rpms               84 k

Transaction Summary
=====================================================================================================================
Upgrade  1 Package (+1 Dependent package)

Total download size: 1.3 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
</SNIP CDN FAILURES>
(1/2): httpd-tools-2.4.6-45.el7_3.4.x86_64.rpm                                                |  84 kB  00:00:00     
(2/2): httpd-2.4.6-45.el7_3.4.x86_64.rpm                                                      | 1.2 MB  00:00:00     
---------------------------------------------------------------------------------------------------------------------
Total                                                                                 14 kB/s | 1.3 MB  00:01:31     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : httpd-tools-2.4.6-45.el7_3.4.x86_64                                                               1/4 
  Updating   : httpd-2.4.6-45.el7_3.4.x86_64                                                                     2/4 
  Cleanup    : httpd-2.4.6-17.el7.x86_64                                                                         3/4 
  Cleanup    : httpd-tools-2.4.6-17.el7.x86_64                                                                   4/4 
  Verifying  : httpd-tools-2.4.6-45.el7_3.4.x86_64                                                               1/4 
  Verifying  : httpd-2.4.6-45.el7_3.4.x86_64                                                                     2/4 
  Verifying  : httpd-tools-2.4.6-17.el7.x86_64                                                                   3/4 
  Verifying  : httpd-2.4.6-17.el7.x86_64                                                                         4/4 

Updated:
  httpd.x86_64 0:2.4.6-45.el7_3.4                                                                                    

Dependency Updated:
  httpd-tools.x86_64 0:2.4.6-45.el7_3.4                                                                              

Complete!

Rechecking Customer Portal Prod following update:

Package	Summary	Advisories
httpd-2.4.6-45.el7_3.4.x86_64.rpm	Apache HTTP Server	<<<<<<<<<<<<<<<<<-----------------

    RHBA-2018:0826
    RHSA-2017:2882
    RHBA-2017:2175

Showing 1 – 3 of 10   <<<<<<<<<<------------------------- Applicable Errata count dropped by 9 due to 'applied' errata, and new pkg installed is shown above.

VERIFIED for Satellite 6 + Portal use cases.

Comment 10 errata-xmlrpc 2020-03-31 19:40:52 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-2020:1028