Bug 732951 - errata mailer doesn't detect and list correct number and list of affected systems
errata mailer doesn't detect and list correct number and list of affected sys...
Status: CLOSED DUPLICATE of bug 640535
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
540
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Tomas Lestach
Red Hat Satellite QA List
:
Depends On:
Blocks: sat541-triage
  Show dependency treegraph
 
Reported: 2011-08-24 05:27 EDT by Tomas Lestach
Modified: 2012-03-08 04:06 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-10-20 15:59:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Text file with lots of SQL text and results (28.40 KB, text/plain)
2011-08-24 09:41 EDT, Clifford Perry
no flags Details

  None (edit)
Description Tomas Lestach 2011-08-24 05:27:12 EDT
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
Comment 1 Clifford Perry 2011-08-24 09:41:25 EDT
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.
Comment 2 Clifford Perry 2011-08-24 09:45:51 EDT
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
Comment 3 Clifford Perry 2011-08-24 09:51:43 EDT
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.
Comment 4 Clifford Perry 2011-10-20 15:59:33 EDT

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

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