Bug 644349

Summary: errata email notification missing when syncing two channels with a common erratum
Product: Red Hat Satellite 5 Reporter: Tomas Lestach <tlestach>
Component: OtherAssignee: Tomas Lestach <tlestach>
Status: CLOSED ERRATA QA Contact: Dimitar Yordanov <dyordano>
Severity: medium Docs Contact:
Priority: high    
Version: 540CC: bhoefer, cperry, dyordano, mzazrivec, pmutha
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: spacewalk-schema-1.2.21-13 satellite-schema-5.4.0.12-1 spacewalk-java-1.2.39-57 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-17 02:37:54 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: 677501    
Attachments:
Description Flags
Bug Verification none

Description Tomas Lestach 2010-10-19 14:10:08 UTC
Description of problem:
when syncing an erratum that contains packages for several channels, errata notification won't bve sent

Version-Release number of selected component (if applicable):
sat540

Steps to Reproduce:
1. sync rhel-i386-server-5 and rhel-x86_64-server-5
2. take a x86_64 client an register it to satellite
3. downgrade libvorbis (part of RHSA-2009:1561 - Security Advisory erratum)
4. just make sure this erratum is relevant only for one system - x86_64
(even if it contains packages for both - rhel-i386-server-5 and rhel-x86_64-server-5)
5. find out errata id, rhel-i386-server-5 id and rhel-x86_64-server-5 id
(in my case: errata_id: 1227, rhel-i386-server-5_id: 121, rhel-x86_64-server-5_ id: 101)
this is an entry point for taskomatic when an erratum get synced:
open sql console - sqlplus $(spacewalk-cfg-get default_db)
SQL> INSERT INTO rhnErrataQueue (ERRATA_ID,CHANNEL_ID,NEXT_ACTION) VALUES (<errata_id>, <rhel-i386-server-5_id>, sysdate);
1 row created.
SQL> INSERT INTO rhnErrataQueue (ERRATA_ID,CHANNEL_ID,NEXT_ACTION) VALUES (<errata_id>, <rhel-x86_64-server-5_ id>, sysdate);
1 row created.
SQL> commit;
Commit complete.
6. wait for ErrataMailer task ... you can check taskomatic log file
7. do the same inserts as in point 5.) but in reverse order

Actual results:
in one of both cases no errata notification arrives

Expected results:
errata notification in both cases

Comment 1 Tomas Lestach 2010-10-19 14:18:18 UTC
I did following changes:

spacewalk.git:
* 926ba96d2bb2b99e2b50dabb090787e149efe687
 - do not list one system several times in the errata notification e-mail
* 8400ff5dff00075035632c4eda4298718f6b23c8
 - do not update/delete all errata entries when the erratum affects multiple channels
* 4b6b1921e9b679e9e87256f4c43726dc0555548d
 - extend ErrataMailer logging
* fa3039dff6543421a5e6516bf1e7ad94509e919d
 - remove hasProcessedErrata method, that prevents processing one erratum for multiple channels

Comment 4 Tomas Lestach 2011-04-14 14:44:30 UTC
*** Bug 684141 has been marked as a duplicate of this bug. ***

Comment 7 Dimitar Yordanov 2011-05-12 13:57:34 UTC
Created attachment 498543 [details]
Bug Verification

Comment 8 Dimitar Yordanov 2011-05-12 13:58:17 UTC
Verified.
# rpm -q spacewalk-schema satellite-schema spacewalk-java
spacewalk-schema-1.2.21-13.el6sat.noarch
satellite-schema-5.4.0.12-1.el6sat.noar

Comment 9 Milan Zázrivec 2011-06-06 11:18:44 UTC
Verified in stage w/ satellite-schema-5.4.0.13-1 & spacewalk-java-1.2.39-82

Comment 10 Clifford Perry 2011-06-17 02:37:54 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

https://rhn.redhat.com/errata/RHSA-2011-0879.html
https://rhn.redhat.com/errata/RHEA-2011-0875.html