Bug #35191
closedEmail notification shows incorrect new errata after syncing an Epel repository
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2105299
Description of problem:
I found that 130 errata in the Epel 8 repository always reported as new Errata in the summary of the email notification. Same issue is also observed in Epel 7 repository.
This is caused by the discrepancy between the Pulp update records and the Katello errata records.
1. Some Errata in EPEL repo have trailing whitespace in the description field. Katello strips the trailing whitespace and save the errata into the DB. When comparing this field, both of them don't match due to the trailing whitespace so consider as updated.
Example:
#Katello DB { "errata_id"=>"FEDORA-EPEL-2021-3d5da78e55", "title"=>"openssh-ldap-authkeys-0.1.0~git20200205.aee4c46-2.el8", "description"=>"Initial packaging for Fedora", } #Pulp update record { "errata_id"=>"FEDORA-EPEL-2021-3d5da78e55", "title"=>"openssh-ldap-authkeys-0.1.0~git20200205.aee4c46-2.el8", "description"=>"Initial packaging for Fedora\n", <================ Trailing whitespace. }
2. Some Errata in EPEL have none standard long title. Katello limits the Errata title to 255 characters and will truncate the rest. When comparing this field, both of them don't match so consider as updated.
Example:
#Katello DB { "errata_id"=>"FEDORA-EPEL-2021-b87459fd6f", "title"=>"certbot-1.22.0-1.el8 python-acme-1.22.0-1.el8 python-certbot-apache-1.22.0-1.el8 python-certbot-dns-cloudflare-1.22.0-1.el8 python-certbot-dns-cloudxns-1.22.0-1.el8 python-certbot-dns-digitalocean-1.22.0-1.el8 python-certbot-dns-dnsimple-1.22.0-1.el8 p...", <============== Truncated "description"=>"update to 1.22.0", } #Pulp update record { "errata_id"=>"FEDORA-EPEL-2021-b87459fd6f" "title"=>"certbot-1.22.0-1.el8 python-acme-1.22.0-1.el8 python-certbot-apache-1.22.0-1.el8 python-certbot-dns-cloudflare-1.22.0-1.el8 python-certbot-dns-cloudxns-1.22.0-1.el8 python-certbot-dns-digitalocean-1.22.0-1.el8 python-certbot-dns-dnsimple-1.22.0-1.el8 python-certbot-dns-dnsmadeeasy-1.22.0-1.el8 python-certbot-dns-gehirn-1.22.0-1.el8 python-certbot-dns-google-1.22.0-1.el8 python-certbot-dns-linode-1.22.0-1.el8 python-certbot-dns-luadns-1.22.0-1.el8 python-certbot-dns-nsone-1.22.0-1.el8 python-certbot-dns-ovh-1.22.0-1.el8 python-certbot-dns-rfc2136-1.22.0-1.el8 python-certbot-dns-route53-1.22.0-1.el8 python-certbot-dns-sakuracloud-1.22.0-1.el8 python-certbot-nginx-1.22.0-1.el8", "description"=>"update to 1.22.0", }
Steps to Reproduce:
1. Login and subscribe the user to sync errata email.
2. Create a repository to sync Epel 8 repository. Url: https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/
3. Sync the repository and you should get an email notification which will report all errata as new (excluding some unknown Fedora errata types).
4. Do a complete sync and wait for the task to finish.
Actual results:
Received and email notification reporting 130 new errata.
Expected results:
Should not send email notification because there is no new errata.
Additional info:
The discrepancy mentioned above also happened in Satellite 6.9.9 but it is reporting the new errata correctly because Satellite 6.9.9 won't update the RepositoryErratum association. It will only create new RepositoryErratum association for new errata.
Updated by Partha Aji over 2 years ago
- Category set to Errata Management
- Target version set to Katello 4.6.0
- Triaged changed from No to Yes
Updated by Samir Jha over 2 years ago
- Target version changed from Katello 4.6.0 to Katello 4.8.0
Updated by Chris Roberts over 2 years ago
- Status changed from New to Assigned
- Assignee set to William Clark
- Target version changed from Katello 4.8.0 to Katello 4.7.0
Updated by Jeremy Lenz about 2 years ago
- Target version changed from Katello 4.7.0 to Katello 4.6.1
- Triaged changed from Yes to No
Updated by Samir Jha about 2 years ago
- Status changed from Assigned to Need more information
- Triaged changed from Yes to No
Hey William,
Can you add the relevant change that fixed this to the issue.
Updated by Samir Jha about 2 years ago
- Target version changed from Katello 4.6.1 to Katello 4.8.0
Moving open issues off of 4.6.1 to 4.8 since we're planning cherry-picks for 4.6.1 soon.
Updated by The Foreman Bot almost 2 years ago
- Status changed from Need more information to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/10372 added
Updated by The Foreman Bot almost 2 years ago
- Fixed in Releases Katello 4.8.0 added
Updated by William Clark almost 2 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|a5e9405a44d62b224257cb3b371e47f35970ea71.