Bug 630884 - no email notification sent after an erratum is synced
Summary: no email notification sent after an erratum is synced
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Satellite Synchronization
Version: 540
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Miroslav Suchý
URL:
Whiteboard:
Depends On:
Blocks: sat540-blockers 644361
TreeView+ depends on / blocked
 
Reported: 2010-09-07 09:12 UTC by Tomas Lestach
Modified: 2010-10-28 15:00 UTC (History)
5 users (show)

Fixed In Version: spacewalk-java-1.2.39-28 spacewalk-schema-1.2.21-7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 644361 (view as bug list)
Environment:
Last Closed: 2010-10-28 15:00:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tomas Lestach 2010-09-07 09:12:16 UTC
Description of problem:
When running satellite-sync and an erratum gets imported, no email notification will be sent to relevant admins

Version-Release number of selected component (if applicable):
Satellite-5.4.0-RHEL5-re20100827.0

How reproducible:
always

Steps to Reproduce:
1. sync erratum via satellite-sync and make sure the erratum is relevant for any system registered
2. check the e-mail of the admin of relevant systems
  
Actual results:
No email notification received

Expected results:
Email notification

Comment 1 Tomas Lestach 2010-09-07 09:14:53 UTC
Fixed. The first commit additionally fixes query that detects upgradeable systems. The second fixes email notification.

spacewalk.git:
 20574243880d52f30a242a7be4d4c72a4292688c
 096bab54117e1f90b515744bf2eb31ff52cd5e0d

Comment 2 Miroslav Suchý 2010-10-06 12:37:15 UTC
# satellite-sync -c redhat-rhn-proxy-5.3-server-i386-5  --no-packages --no-rpms --no-kickstarts
...
08:15:26 Downloading errata data
08:15:26    Retrieving / parsing errata data: redhat-rhn-proxy-5.3-server-i386-5 (2)
            ________________________________________
Downloading:######################################## - complete
08:15:28 Downloading errata data complete
08:15:28
08:15:28 Importing channel errata
08:15:28    Importing *relevant* errata: redhat-rhn-proxy-5.3-server-i386-5 (2)
            ________________________________________
Downloading:######################################## - complete
    Import complete:
        Begin time: Wed Oct  6 08:14:33 2010
        End time:   Wed Oct  6 08:15:32 2010
        Elapsed:    0 hours, 0 minutes, 58 seconds

[root@ibm-x3650-01 ~]# mailq
/var/spool/mqueue is empty
                Total requests: 0
[root@ibm-x3650-01 ~]# mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/spool/mail/root": 7 messages 7 unread
>U  1 root  Mon Oct  4 14:11  17/853   "test"
 U  2 logwatch@ibm-x3650-0  Mon Oct  4 14:40  45/1916  "Logwatch for ibm-x3650-01.ovirt.rhts.eng.bos.redhat.com (Linu"
 U  3 root  Mon Oct  4 14:43  19/1065  "Anacron job for 'ibm-x3650-01.ovirt.rhts.eng.bos.redhat.com' "
 U  4 logwatch@ibm-x3650-0  Tue Oct  5 04:02 468/17735 "Logwatch for ibm-x3650-01.ovirt.rhts.eng.bos.redhat.com (Linu"
 U  5 root  Tue Oct  5 04:03  27/1236  "Cron <root@ibm-x3650-01> run-parts /etc/cron.daily"
 U  6 logwatch@ibm-x3650-0  Wed Oct  6 04:02  71/2537  "Logwatch for ibm-x3650-01.ovirt.rhts.eng.bos.redhat.com (Linu"
 U  7 root  Wed Oct  6 04:02  27/1236  "Cron <root@ibm-x3650-01> run-parts /etc/cron.daily"
& Held 7 messages in /var/spool/mail/root

No email arrived.
taskomatic.com.redhat.rhn.taskomatic.task.ErrataMailer.schedule = 0 0/30 * * * ?
Aha, so I have to wait 15 minutes till 08:30....

15 minutes later:
[root@ibm-x3650-01 ~]# date
Wed Oct  6 08:35:32 EDT 2010
[root@ibm-x3650-01 ~]# mailq
/var/spool/mqueue is empty
                Total requests: 0
[root@ibm-x3650-01 ~]# mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/spool/mail/root": 7 messages 7 unread
>U  1 root  Mon Oct  4 14:11  17/853   "test"
 U  2 logwatch@ibm-x3650-0  Mon Oct  4 14:40  45/1916  "Logwatch for ibm-x3650-01.ovirt.rhts.eng.bos.redhat.com (Linu"
 U  3 root  Mon Oct  4 14:43  19/1065  "Anacron job for 'ibm-x3650-01.ovirt.rhts.eng.bos.redhat.com' "
 U  4 logwatch@ibm-x3650-0  Tue Oct  5 04:02 468/17735 "Logwatch for ibm-x3650-01.ovirt.rhts.eng.bos.redhat.com (Linu"
 U  5 root  Tue Oct  5 04:03  27/1236  "Cron <root@ibm-x3650-01> run-parts /etc/cron.daily"
 U  6 logwatch@ibm-x3650-0  Wed Oct  6 04:02  71/2537  "Logwatch for ibm-x3650-01.ovirt.rhts.eng.bos.redhat.com (Linu"
 U  7 root  Wed Oct  6 04:02  27/1236  "Cron <root@ibm-x3650-01> run-parts /etc/cron.daily"

Comment 3 Miroslav Suchý 2010-10-06 13:56:07 UTC
Ops I did not have any system registred to that channel. Taking back.

Comment 4 Miroslav Suchý 2010-10-11 07:02:54 UTC
After new sync I see for system one security errata and 19 bug fix erratas.

I got one email about that security errata:

Date: Sat, 9 Oct 2010 07:20:18 -0400
From: RHN Satellite <dev-null.eng.bos.redhat.com>
To: root.eng.bos.redhat.com
Subject: RHN Satellite Errata Alert: RHSA-2009:1561-1 - Important: libvorbis security update

no email about that 19 bug fix erratas. And I checked that in past we sent notifications about RHBA as well.

Comment 5 Miroslav Suchý 2010-10-11 10:42:14 UTC
[12:27] <tlestach> msuchy, 630884
[12:27] <mirek> tlestach: yes?
[12:27] <tlestach> msuchy, you had your system registered and then you've synced all the errata
[12:28] <tlestach> msuchy, and all the errata are applicable to the single system>
[12:28] <tlestach> ?
[12:29] <mirek> tlestach: I first synced RHEL4 channel without anything (--no-packages --no-rpms --no-kickstarts --no-errata)
[12:30] <mirek> tlestach: then registred rhel4 machine: https://sgi-xe310-02.rhts.eng.bos.redhat.com/rhn/systems/details/Overview.do?sid=1000010000
[12:30] <mirek> tlestach: then run satellites-sync withou option, then wait over week
[12:31] <mirek> err weekend
[12:32] <mirek> tlestach: and got only email about RHSA, although webui shows 19 relevant RHBA
[12:33] <mirek> tlestach: feel free to log in to both machines if you need to
[12:33] <tlestach> mirek, I'd like to
[12:33] <tlestach> mirek, please state into BZ what you've done
[12:34] <mirek> tlestach: hmm, weird, it now shows 16 erratas relevant, I would say that there was 19 previously, but I'm not 100% sure
[12:35] <mirek> tlestach: and I just noticed that there are some other RHSA erratas as well, and I got email only about that one.
[12:35] <tlestach> mirek, 16 or 19 - it doesn't matter
[12:35] <mirek> nod :)
[12:36] <tlestach> mirek, I'd say your scenario isn't correct
[12:36] <mirek> tlestach: why?
[12:38] <tlestach> mirek, if you sat-sync those errata (your 2nd sat-sync), the satellite doesn't sync any new package information (bacasue all the package metadata information is already know) - so there's nothing new to apply
[12:38] <tlestach> mirek, => no e-mail
[12:39] <mirek> tlestach: for first time, I did not sync any packages (remember --no-packages --no-rpms --no-kickstarts --no-errata)
[12:39] <tlestach> mirek, simply said - there's nothing new applicable
[12:39] <mirek> tlestach: but even if I will do that, why I got that one email?
[12:39] <tlestach> mirek, ok -the email is a good argument
[12:39] <tlestach> :-)
[12:40] <tlestach> mirek, I'll check what makes --no-packages option
[12:40] <mirek> and the fact that I registred that machine into totaly empty channel where was 0 packages
[12:40] <tlestach> mirek, ok, I'll investigate
[12:41] <tlestach> mirek, just please write into the BZ what you've done and what you've seen
[12:41] <mirek> "satellite-sync -c foo  --no-packages --no-rpms --no-kickstarts --no-errata" will finish in just a moment and create empty channel. You can try it yourself

Comment 6 Tomas Lestach 2010-10-11 17:32:06 UTC
Just a note - the trouble seems to be in the erratamailer_fill_work_queue. Guys tried to tune the INSERT a mistake happened. :-)

Comment 9 Tomas Lestach 2010-10-12 16:24:08 UTC
The trouble was that rhnServerNeededCache wasn't regenerated at the time errata notification task was run. That means no updates were recognized and that's why no email was sent. (Errata was marked as processed, so next run didn't help.)
I made sure to work with latest data:

spacewalk.git:
 9f4f7fd382e5f9e13359f75b35cb258f689c4627
 6dbea8e78616019ae2e99eed7c60b0a569dc649f

satellite.git:
 b37d531da7dc56cdd4b7bec4815dab0a830201e9
 3a572ccfe6196aee8e885ac723e0e4ef1f41108b

Setting to MODIFIED, cause even if I've built the packages, one of them is spacewalk-schema -> need to wait for the new iso.

Comment 12 Miroslav Suchý 2010-10-15 15:47:47 UTC
This one it was close, but sorry I have to give FAILQA as it miss one email.

This is relevant errata as shown in WebUI:
Bug Fix Advisory   	 RHBA-2009:1586   	 kernel-utils bug fix update  	 1   	 11/17/09
Security Advisory 	RHSA-2009:1561 	Important: libvorbis security update 	1 	11/9/09
Bug Fix Advisory 	RHBA-2009:0254 	sane-backends bug fix update 	1 	5/18/09
Bug Fix Advisory 	RHBA-2009:1014 	redhat-artwork bug fix update 	1 	5/18/09
Bug Fix Advisory 	RHBA-2009:0998 	xorg-x11 bug fix and enhancement update 	1 	5/18/09
Security Advisory 	RHSA-2009:0344 	Moderate: libsoup security update 	1 	3/16/09
Bug Fix Advisory 	RHBA-2008:0728 	GConf2 bug fix update 	1 	7/24/08
Bug Fix Advisory 	RHBA-2007:0802 	pygtk2 bug fix update 	1 	11/15/07
Bug Fix Advisory 	RHBA-2007:0775 	libwnck bug fix update 	1 	11/15/07
Bug Fix Advisory 	RHBA-2007:0772 	gamin bug fix update 	1 	11/15/07
Bug Fix Advisory 	RHBA-2006:0643 	pilot-link bug fix update 	1 	5/1/07
Bug Fix Advisory 	RHBA-2007:0181 	zsh bug fix update 	1 	5/1/07
Bug Fix Advisory 	RHBA-2007:0314 	ttmkfdir bug fix update 	1 	4/30/07
Bug Fix Advisory 	RHBA-2006:0072 	xorg-x11 bug fix update 	1 	3/7/06
Security Advisory 	RHSA-2005:584 	zlib security update 	1 	7/21/05
Security Advisory 	RHSA-2005:033 	alsa-lib security update 	1 	2/15/05 

This is emails user get after syncing erratas:
[root@ibm-x3650-04 ~]# mail
Mail version 8.1 6/6/93.  Type ? for help.                                                                                                        
"/var/spool/mail/root": 23 messages 23 unread                                                                                                     
>U  1 root  Wed Oct 13 12:32  17/856   "test"                                                                                     
 U  2 logwatch@ibm-x3650-0  Wed Oct 13 13:01  45/1919  "Logwatch for ibm-x3650-04.ovirt.rhts.eng.bos.redhat.com (Linux)"                          
 U  3 logwatch@ibm-x3650-0  Thu Oct 14 04:02 475/17899 "Logwatch for ibm-x3650-04.ovirt.rhts.eng.bos.redhat.com (Linux)"                          
 U  4 dev-null@ibm-x3650-0  Thu Oct 14 10:11  21/1060  "RHN TASKOMATIC NOTIFICATION from ibm-x3650-04.ovirt.rhts.eng.bos.redhat.com"              
 U  5 dev-null@ibm-x3650-0  Thu Oct 14 10:12  19/1002  "RHN TASKOMATIC NOTIFICATION from ibm-x3650-04.ovirt.rhts.eng.bos.redhat.com"              
 U  6 rhn-satellite@ibm-x3  Thu Oct 14 16:10  50/2754  "RHN Management Satellite sync. report from ibm-x3650-04.ovirt.rhts.eng.bos.redhat.com"    
 U  7 rhn-satellite@ibm-x3  Fri Oct 15 03:55  50/2740  "RHN Management Satellite sync. report from ibm-x3650-04.ovirt.rhts.eng.bos.redhat.com"    
 U  8 logwatch@ibm-x3650-0  Fri Oct 15 04:02  98/3285  "Logwatch for ibm-x3650-04.ovirt.rhts.eng.bos.redhat.com (Linux)"                          
 U  9 dev-null@ibm-x3650-0  Fri Oct 15 07:32 104/4461  "RHN Satellite Errata Alert: RHSA-2009:0344-4 - Moderate: libsoup security update"         
 U 10 dev-null@ibm-x3650-0  Fri Oct 15 07:48 101/4114  "RHN Satellite Errata Alert: RHSA-2005:033-13 - alsa-lib security update"                  
 U 11 dev-null@ibm-x3650-0  Fri Oct 15 07:59  99/4005  "RHN Satellite Errata Alert: RHBA-2009:0254-2 - sane-backends bug fix update"              
 U 12 dev-null@ibm-x3650-0  Fri Oct 15 08:02  99/4039  "RHN Satellite Errata Alert: RHBA-2009:1014-1 - redhat-artwork bug fix update"             
 U 13 dev-null@ibm-x3650-0  Fri Oct 15 08:03 125/5115  "RHN Satellite Errata Alert: RHBA-2009:0998-1 - xorg-x11 bug fix and enhancement update"   
 U 14 dev-null@ibm-x3650-0  Fri Oct 15 08:04 111/4767  "RHN Satellite Errata Alert: RHBA-2009:1586-1 - kernel-utils bug fix update"               
 U 15 dev-null@ibm-x3650-0  Fri Oct 15 08:07  92/3684  "RHN Satellite Errata Alert: RHBA-2006:0643-5 - pilot-link bug fix update"                 
 U 16 dev-null@ibm-x3650-0  Fri Oct 15 08:11  96/3818  "RHN Satellite Errata Alert: RHBA-2007:0181-4 - zsh bug fix update"                        
 U 17 dev-null@ibm-x3650-0  Fri Oct 15 08:13  92/3598  "RHN Satellite Errata Alert: RHBA-2007:0314-5 - ttmkfdir bug fix update"                   
 U 18 dev-null@ibm-x3650-0  Fri Oct 15 08:15  94/3737  "RHN Satellite Errata Alert: RHBA-2007:0802-2 - pygtk2 bug fix update"                     
 U 19 dev-null@ibm-x3650-0  Fri Oct 15 08:16  95/3731  "RHN Satellite Errata Alert: RHBA-2007:0772-3 - gamin bug fix update"                      
 U 20 dev-null@ibm-x3650-0  Fri Oct 15 08:17  94/3743  "RHN Satellite Errata Alert: RHBA-2007:0775-3 - libwnck bug fix update"                    
 U 21 dev-null@ibm-x3650-0  Fri Oct 15 08:24  96/3896  "RHN Satellite Errata Alert: RHBA-2008:0728-4 - GConf2 bug fix update"                     
 U 22 dev-null@ibm-x3650-0  Fri Oct 15 08:28 107/4443  "RHN Satellite Errata Alert: RHSA-2005:584-07 - zlib security update"                      
 U 23 dev-null@ibm-x3650-0  Fri Oct 15 08:34 125/4974  "RHN Satellite Errata Alert: RHBA-2006:0072-13 - xorg-x11 bug fix update"


There are two noteworth things:

1) email about 
 RHSA-2009:1561 	Important: libvorbis security update
is missing, which qualify this bug to FAILQA

2) performance

satellite sync ended at:
    Import complete:
        Begin time: Fri Oct 15 05:42:59 2010
        End time:   Fri Oct 15 07:13:48 2010
        Elapsed:    1 hours, 30 minutes, 48 seconds 

First email was sent at: 7:32 (which is ok) and last was sent at 8:34. This open question how this will behave, if you have to sent errata notification for 1000 systems/users.

Comment 13 Tomas Lestach 2010-10-19 14:20:14 UTC
Issue described in Comment#13 1) was addressed by BZ#644349

Comment 14 Miroslav Suchý 2010-10-19 14:42:53 UTC
I tested it twice and it works now. It seems that first problem do not have deterministic reproducer, but we agreed with Tomas, that the problem is there.
 
With known issues described in BZ 644349 and BZ 644361 I'm giving it VERIFIED.

Comment 16 Clifford Perry 2010-10-28 14:55:22 UTC
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. 


RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332

RHEA-2010:0803 - RHN Tools enhancement update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333

RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334

RHEA-2010:0800 - RHN Satellite Server 5.4.0
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335

Docs are available:

http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html 

Regards,
Clifford


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