Description of problem: Some of the systems are listed several times in the Errata Alert Emails. Version-Release number of selected component (if applicable): sat541, spacewalk-java-1.2.39-91.el5sat Steps to Reproduce: 1. Sync a relevant erratum and check: * /var/log/rhn/rhn_taskomatic_daemon.log * Errata Alert e-mails sent to appropriate satellite admins Actual results: a.) From rhn_taskomatic.log: INFO | jvm 2 | 2011/08/23 11:30:02 | 2011-08-23 11:30:02,670 [DefaultQuartzScheduler_Worker-9] INFO com.redhat.rhn.taskomatic.task.ErrataMailer - Found 54 systems for erratum 2726 in channel 101 for org1. But only 11 systems are registered to the satellite. b.) Some of the systems are listed several times in the Errata Alert e-mails. --------------------- Affected Systems List --------------------- This Errata Advisory may apply to the systems listed below. If you know that this errata does not apply to a system listed, it might be possible that the package profile for that server is out of date. In that case you should run 'up2date -p' (RHEL 4 and below) or 'rhn-profile-sync' (RHEL 5 and above) as root on the system in question to refresh your software profile. There are 27 affected systems registered in 'Overview' (only systems for which you have explicitly enabled Errata Alerts are shown). Release Arch Profile Name ---------- ---------- --------------------------------------------- 5Server i686 rlx-2-14.rhndev.redhat.com (3x) 5Server i686 rlx-3-04.rhndev.redhat.com (6x) 5Server i686 xen17.englab.brq.redhat.com 5Server i686 xen17.englab.brq.redhat.com 5Server i686 xen17.englab.brq.redhat.com 5Server i686 rlx-0-24.rhndev.redhat.com (3x) 5Server i686 rlx-1-18.rhndev.redhat.com (12x) Appropriate WebUI page https://<satellite>/rhn/errata/details/SystemsAffected.do?eid=2726 lists 8 systems only (some of the system profiles are duplicated). Expected results: Correct number of relevant systems detected and complete list of relevant systems without any duplicates
Created attachment 519642 [details] Text file with lots of SQL text and results Attaching my own quick review. IT seems highly likely (with a slow down) that using DISTINCT with the SQL will pass to the Errata mailer a correct list of systems effected per org, per user for each errata.
Within java/code/src/com/redhat/rhn/taskomatic/task/ErrataMailer.java it seems that the getUserServers will correctly list servers for each user. So likely this distinct would indeed pass correct data to the java layer, before mailing out. We could also distinct the data in java stack - vs assuming we get correct unique data from query. Cliff
The distinct reduced from 48 (8x6) results, to 16 (2x8). Since there is two users, 16 results actually is the correct looking data set to return.
*** This bug has been marked as a duplicate of bug 640535 ***