RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1742822 - package profile upload seems to be broken on RHEL7.7
Summary: package profile upload seems to be broken on RHEL7.7
Keywords:
Status: CLOSED DUPLICATE of bug 1743120
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.7
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On: 1742208 1754859
Blocks: 1741577
TreeView+ depends on / blocked
 
Reported: 2019-08-16 22:00 UTC by Mike McCune
Modified: 2019-09-24 08:59 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1742208
Environment:
Last Closed: 2019-08-19 13:18:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mike McCune 2019-08-16 22:00:43 UTC
+++ This bug was initially created as a clone of Bug #1742208 +++

+++ This bug was initially created as a clone of Bug #1741577 +++

Description of problem:
Since the upgrade (of the client) to RHEL 7.7, "yum install <something>" seems not to properly trigger a package profile upload, leading to wrongly calculated errata information


Version-Release number of selected component (if applicable):
katello-host-tools-3.5.1-1.el7sat.noarch

How reproducible:
100%

Steps to Reproduce:
1. yum install walrus-0.71-1
2. hammer host errata list --host <hostname>

Actual results:
# yum install walrus-0.71-1
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager, tracer_upload, versionlock
Satellite-Satellite-6.6-compose                                                                                                                                                                                                                                    | 4.2 kB  00:00:00     
Test_Organization_Test_Product_Zoo                                                                                                                                                                                                                                 | 2.1 kB  00:00:00     
sattools-6.6-compose                                                                                                                                                                                                                                               | 3.8 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package walrus.noarch 0:0.71-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=========================
 Package      Arch          Version   Repository           Size
=========================
Installing:
 walrus      noarch          0.71-1   Test_Organization_Test_Product_Zoo      2.4 k

Transaction Summary
=========================
Install  1 Package

Total download size: 2.4 k
Installed size: 84  
Is this ok [y/d/N]: y
Downloading packages:
walrus-0.71-1.noarch.rpm      | 2.4 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : walrus-0.71-1.noarch                                                                                                                                                                                                                                                   1/1 
Uploading Package Profile
Uploading Tracer Profile
  Verifying  : walrus-0.71-1.noarch                                                                                                                                                                                                                                                   1/1 

Installed:
  walrus.noarch 0:0.71-1                                                                                                                                                                                                                                                                  

Complete!

# hammer host errata list --host $(hostname -f)
---|------------|------|-------|------------
ID | ERRATUM ID | TYPE | TITLE | INSTALLABLE
---|------------|------|-------|------------


Expected results:
# hammer host errata list --host $(hostname -f)
---|----------------|----------|-------------|------------
ID | ERRATUM ID     | TYPE     | TITLE       | INSTALLABLE
---|----------------|----------|-------------|------------
4  | RHEA-2012:0055 | security | Sea_Erratum | true       
---|----------------|----------|-------------|------------


Additional info:
"katello-package-upload -f" works as a workaround

--- Additional comment from RHEL Product and Program Management on 2019-08-15 13:08:52 UTC ---

Since this issue was entered in Red Hat Bugzilla, the pm_ack has been set to + automatically for the next planned release.

--- Additional comment from Evgeni Golov on 2019-08-15 13:10:53 UTC ---

tfm-rubygem-katello-3.12.0.7-1.el7sat.noarch is the Katello version on the server

--- Additional comment from Evgeni Golov on 2019-08-15 13:14:56 UTC ---

seems also to affect 6.5

--- Additional comment from Partha Aji on 2019-08-15 21:59:55 UTC ---

TLDR work - around-
package_profile_on_trans=0 in /etc/rhsm/rhsm.conf


Explanation: 
Satellite needs reports on Enabled repositories, and installed packages from the client in order to do Errata Management.
These reports used to be provided to the satellite by plugins installed via katello-host-tools rpm.

In RHEL 8 we moved the upload functionality to subscription-manager (subscription-manager 1.23.2 and above.) 
Subscription manager added dnf plugins for this functionality but not yum plugins (used in rhel7.)
As a side effect we require katello-host-tools plugins to be installed on RHEL 7 and have it call subscription-manager.

The way its written Katello-host-tools will check if subscription-manager handles the upload using a config entry in /etc/rhsm/rhsm.conf. 
If it notices package_profile_on_trans=1, it stops running any further with the assumption that subman plugins will handle the upload.
OTOH if host tools notices that package_profile_on_trans=0, it directs the subman to upload the package profile.

The problem here occurs because on a 6.5+ Satellite the bootstrap rpm automatically attempts to set package_profile_on_trans to 1 in /etc/rhsm/rhsm.conf .  In RHEL 7.7 and 8
that config entry is set to 1. In RHEL 7.6 and before this was not an issue because subscription-manager would fail on an invalid config entry (and hence this var would not get set.)
In RHEL 7.7 the subscription manager allows for the config entry but does not do any plugin uploading by itself. 

Quick Fix - Short term
---------
Have the bootstrap script say "If rhel7 set package_profile_on_trans=0". This change would force host tools to always do the uploading (via subman connection).

Long Term:
---------
Subman has to have  yum plugins to upload the profile reports automatically. We can then not require host tools for update.

--- Additional comment from Brad Buckingham on 2019-08-16 13:50:09 UTC ---

Partha,

Can you confirm that this issue does not impact releases prior to 6.5.z?  (e.g. 6.3.z/6.4.z)

Thanks!

--- Additional comment from Partha Aji on 2019-08-16 15:39:27 UTC ---

Tested on sat 6.3 with 6.3 host tools and sat 6.4 with 6.4 host tools. Works well

--- Additional comment from RHEL Product and Program Management on 2019-08-16 16:30:43 UTC ---

Since this bug report was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release.

--- Additional comment from Mike McCune on 2019-08-16 19:47:49 UTC ---

flagging for rhel-7.7.0 as discussed via email with RHEL PM.

--- Additional comment from Chris Snyder on 2019-08-16 21:05:23 UTC ---

FIXED IN
--------
subscription-manager-1.24.15-1.el7

PATCH(ES)
---------
http://pkgs.devel.redhat.com/cgit/rpms/subscription-manager/commit/?id=b70a17f6746aa8d0c5bc580543fbb490404baff2

--- Additional comment from errata-xmlrpc on 2019-08-16 21:06:28 UTC ---

Bug report changed to ON_QA status by Errata System.
A QE request has been submitted for advisory RHBA-2019:44926-01
https://errata.devel.redhat.com/advisory/44926

Comment 2 Chris Williams 2019-08-19 13:18:25 UTC

*** This bug has been marked as a duplicate of bug 1743120 ***


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