Bug 251196 - yum-updatesd doesn't send e-mails about updates
Summary: yum-updatesd doesn't send e-mails about updates
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-updatesd
Version: 7
Hardware: i686
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-08-07 18:33 UTC by Richard Fearn
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-08-08 21:15:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
error when running manually (1.18 KB, text/plain)
2007-08-07 18:34 UTC, Richard Fearn
no flags Details
configuration file (402 bytes, text/plain)
2007-08-07 18:35 UTC, Richard Fearn
no flags Details
command line output with 3.2.2-1 (1.35 KB, text/plain)
2007-08-08 17:52 UTC, Richard Fearn
no flags Details
command line output with 0.4-1.fc8 (1.35 KB, text/plain)
2007-08-08 18:56 UTC, Richard Fearn
no flags Details
patch for yum-updatesd (580 bytes, patch)
2007-08-08 20:58 UTC, Richard Fearn
no flags Details | Diff
patch for yum-updatesd-helper (948 bytes, patch)
2007-08-08 20:59 UTC, Richard Fearn
no flags Details | Diff

Description Richard Fearn 2007-08-07 18:33:09 UTC
Description of problem:
yum-updatesd isn't sending me e-mail alerts about package updates. When run as a
service, nothing happens. When run manually, it fails with an error.

Version-Release number of selected component (if applicable):
yum-3.2.1-1.fc7
yum-updatesd-3.2.1-1.fc7

How reproducible:
Every time when run manually from the command line. If the yum-updatesd service
is running I simply don't get any alerts.

Steps to Reproduce:
1. service yum-updatesd start
2. verify that updates are available (e.g. yum check-update)
  
Actual results:
* with yum-updatesd service running: don't get any e-mails
* when run from command line: get an error

Expected results:
should receive e-mail in both cases

Additional info:
I've tried running it from the command line using:

  python /usr/share/yum-cli/yumupd.py -f

and get the attached error.

See also the attached configuration file - I *have* set it up to send e-mails!!

Comment 1 Richard Fearn 2007-08-07 18:34:33 UTC
Created attachment 160837 [details]
error when running manually

This occurs each time it checks for new updates.

Comment 2 Richard Fearn 2007-08-07 18:35:49 UTC
Created attachment 160838 [details]
configuration file

Set up to check every 10 seconds, just for testing, and should send alerts via
e-mail.

Comment 3 Jeremy Katz 2007-08-07 20:19:35 UTC
Can you try the yum-updatesd package from rawhide (it should install fine on F7
without any different deps), and see if it works better?

Comment 4 Richard Fearn 2007-08-08 17:50:09 UTC
I installed the new package from rawhide, which took me from 3.2.1-1 to 3.2.2-1.
(I also had to update yum to 3.2.2-1.) Unfortunately it still doesn't work. See
the new attachment.

Comment 5 Richard Fearn 2007-08-08 17:52:51 UTC
Created attachment 160922 [details]
command line output with 3.2.2-1

Comment 6 Jeremy Katz 2007-08-08 18:30:19 UTC
3.2.2 is the old yum-updatesd -- 0.4 (with an epoch) is the new one.  Did you
perhaps grab the package from updates-testing and not rawhide (the development
tree)?

Comment 7 Richard Fearn 2007-08-08 18:53:50 UTC
Yeah, thanks for spotting that. I've installed the correct package now but the
error is still the same. See the new attachment.

Comment 8 Richard Fearn 2007-08-08 18:56:01 UTC
Created attachment 160928 [details]
command line output with 0.4-1.fc8

Comment 9 Jeremy Katz 2007-08-08 19:21:58 UTC
The bits in /usr/share/yum-cli aren't what you want (still the old stuff).  Try
/usr/sbin/yum-updatesd -f

Comment 10 Richard Fearn 2007-08-08 20:51:25 UTC
Yeah, I spotted that a while ago, and I've been looking into this a bit more.
With "emit_via = email", yum-updatesd is invoking the helper like this:

/usr/bin/python -tt /usr/libexec/yum-updatesd-helper --check --download --deps
--email --email-from=root --email-to=['root']

It is now trying to send e-mail which is an improvement! However, the helper
just reads the --email-to parameter as a string - so it's "['root']", or
"['email1', 'email2']" if "email_to = email1,email2" is used in
yum-updatesd.conf. Postfix doesn't like "['root']" as a recipient (the Python
sendmail library passes this string through untouched).

I think yum-updatesd should pass this parameter to the helper in the form
--email-to=email1,email2 (i.e. the array of recipients joined with a comma), and
then the helper can split them back up into an array.

I'll attach a couple of patches to yum-updatesd and yum-updatesd-helper - this
makes everything work for me.

Comment 11 Richard Fearn 2007-08-08 20:58:55 UTC
Created attachment 160938 [details]
patch for yum-updatesd

Comment 12 Richard Fearn 2007-08-08 20:59:12 UTC
Created attachment 160939 [details]
patch for yum-updatesd-helper

Comment 13 Jeremy Katz 2007-08-08 21:15:45 UTC
Awesome, thanks.  Applied the patch and it'll be in 0.5.  And my plan is to
hopefully push the new yum-updatesd for F7 within the next week or two

Comment 14 Richard Fearn 2007-08-08 21:42:00 UTC
Just out of interest, was this the change that fixed the SQLite thread error?

http://devel.linux.duke.edu/gitweb/?p=yum-updatesd.git;a=commit;h=186e9fe4253345c31c36793cfd8687e9ebea2207

(Obviously I ended up fixing a different problem to the one I reported!)

Thanks.

Comment 15 Jeremy Katz 2007-08-08 21:47:11 UTC
Yep 


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