Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1639086

Summary: subscription manager sends package report to the Satellite even nothing has changed .
Product: Red Hat Enterprise Linux 7 Reporter: Hao Chang Yu <hyu>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: cdonnell, csnyder, hyu, khowell, redakkan, roarora, skallesh
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 12:57:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hao Chang Yu 2018-10-15 03:30:14 UTC
Created attachment 1493908 [details]
rpm with utf8 vendor name

Description of problem:
If a client installed a non Red Hat rpm with utf8 vendor name, subscription manager will fail to compare the installed package with the cached package profile. This caused subscription manager to send the same package profile report to the Satellite repeatedly.

Bug 1519512 fixed part of the issue.

Adding "_normalize_string" to the package comparison seems to fix the issue.

--- /tmp/profile.py	2018-10-15 11:05:17.256224881 +1000
+++ /usr/lib64/python2.7/site-packages/rhsm/profile.py	2018-10-15 11:05:28.528353754 +1000
@@ -65,7 +65,7 @@
                 self.release == other.release and \
                 self.arch == other.arch and \
                 self.epoch == other.epoch and \
-                self.vendor == other.vendor:
+                self._normalize_string(self.vendor) == self._normalize_string(other.vendor):
             return True


This issue caused rhsmcertd to send package report to the Satellite every 4 hours before upgrading to "subscription-manager-1.20.11-1.el7_5.x86_64" but the issue is gone after I did the upgrade. The issue is still happen in katello-package-upload which is calling the same function. I am not sure why.

How reproducible:

# katello-package-upload
/usr/lib64/python2.7/site-packages/rhsm/profile.py:68: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  self.vendor == other.vendor:


Thanks.

Regards
Hao

Comment 7 Craig Donnelly 2019-05-01 20:09:18 UTC
Cancelling needinfo on Hao, got a package for testing.

Verified with a test package containing special characters in vendor.

Tested against Satellite 6.4.2 with packages:

[root@dhcp-8-30-234 ~]# rpm -q katello-agent katello-host-tools subscription-manager
katello-agent-3.3.5-5.el7sat.noarch
katello-host-tools-3.3.5-5.el7sat.noarch
subscription-manager-1.24.3-1.el7.x86_64

===================================================================================================

[root@dhcp-8-30-234 anchors]# yum install umlaut-vendor -y
Loaded plugins: product-id, subscription-manager
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager
kwalker-rpmissues                                                                             | 3.4 kB  00:00:00     
rhel-7-server-rpms                                                                            | 2.0 kB  00:00:00     
rhel-7-server-satellite-tools-6.4-rpms                                                        | 2.1 kB  00:00:00     
kwalker-rpmissues/x86_64/primary_db                                                           | 1.9 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package umlaut-vendor.x86_64 0:0.1-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================
 Package                       Arch                   Version                Repository                         Size
=====================================================================================================================
Installing:
 umlaut-vendor                 x86_64                 0.1-1                  kwalker-rpmissues                 1.6 k

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

Total download size: 1.6 k
Installed size: 0  
Downloading packages:
umlaut-vendor-0.1-1.x86_64.rpm                                                                | 1.6 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : umlaut-vendor-0.1-1.x86_64                                                                        1/1 
Uploading Package Profile
Loaded plugins: product-id, subscription-manager
Loaded plugins: product-id, subscription-manager
  Verifying  : umlaut-vendor-0.1-1.x86_64                                                                        1/1 

Installed:
  umlaut-vendor.x86_64 0:0.1-1                                                                                       

Complete!
Uploading Enabled Repositories Report
Loaded plugins: product-id, subscription-manager

[root@dhcp-8-30-234 anchors]# rpm -qli umlaut-vendor
Name        : umlaut-vendor
Version     : 0.1
Release     : 1
Architecture: x86_64
Install Date: Wed 01 May 2019 03:52:05 PM EDT
Group       : Applications/Productivity
Size        : 0
License     : GPL
Signature   : (none)
Source RPM  : umlaut-vendor-0.1-1.src.rpm
Build Date  : Wed 01 May 2019 03:48:02 PM EDT
Build Host  : copr-vm-production-psi-os-00016252-20190501-190955
Relocations : (not relocatable)
Packager    : Red Hat Copr
Vendor      : Öh NÖ!
Summary     : Dummy summary
Description :
This is a dummy description.
(contains no files)

[root@dhcp-8-30-234 anchors]# cd

[root@dhcp-8-30-234 ~]# katello-package-upload 
Loaded plugins: product-id, subscription-manager
Loaded plugins: product-id, subscription-manager

[root@dhcp-8-30-234 ~]# 

Did not receive any errors.
Based on a review of the tasks within the Satellite, there are no duplicate upload-package-profile tasks being created when the Satellite already has the proper list with this condition.
Tested with rhsmcertd restart and a two minute checkin - splay = 0.

Comment 9 errata-xmlrpc 2019-08-06 12:57:25 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-2019:2008