Bug 375731 - yum-presto not working as expected
Summary: yum-presto not working as expected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yum-presto
Version: 8
Hardware: i686
OS: Linux
low
high
Target Milestone: ---
Assignee: Jonathan Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-11 11:03 UTC by Rohan Dhruva
Modified: 2007-12-06 20:45 UTC (History)
3 users (show)

Fixed In Version: 0.4.3-1.fc8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-12-06 20:45:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
My presto.conf, after modification (265 bytes, text/plain)
2007-11-11 11:03 UTC, Rohan Dhruva
no flags Details
My presto-enabled fedora-updates.repo (1.10 KB, text/plain)
2007-11-11 19:13 UTC, Rohan Dhruva
no flags Details
The said attachment (141.65 KB, application/x-bzip)
2007-11-12 21:06 UTC, Rohan Dhruva
no flags Details
Updated presto.py (13.57 KB, text/x-python)
2007-11-15 07:16 UTC, Jonathan Dieter
no flags Details
Errors still persist (2.00 KB, application/x-bzip)
2007-11-15 09:14 UTC, Rohan Dhruva
no flags Details

Description Rohan Dhruva 2007-11-11 11:03:08 UTC
Description of problem:
I have installed Fedora 8 using the GNOME live cd. Further I installed
yum-presto, and after reading the README file in /usr/share/doc/yum-presto-0.4.2
, I modified my /etc/yum/pluginconf.d/presto.conf which I have attached. Even
after making those changes, yum update doesn't use presto. The following is the
output of yum update -
[rohan@localhost ~]$ sudo yum check-update
Loading "presto" plugin
Setting up and reading Presto delta metadata
No Presto metadata available for livna
No Presto metadata available for fedora
No Presto metadata available for adobe-linux-i386
No Presto metadata available for updates
...

To mitigate the problem, I even downloaded prestomd.xml and presto.xml.gz to
/var/cache/yum/fedora (and similarly for updates repo too), which didn't work
either.

Version-Release number of selected component (if applicable):
0.4.2-1.fc8

How reproducible:
Always

Steps to Reproduce:
1. sudo yum update
2. Check the first few lines of output

Actual results:
No Presto metadata available for fedora
No Presto metadata available for updates

Expected results:
Incremental updates should be enabled an used.

Additional info:

Comment 1 Rohan Dhruva 2007-11-11 11:03:09 UTC
Created attachment 254381 [details]
My presto.conf, after modification

Comment 2 Jonathan Dieter 2007-11-11 13:01:40 UTC
This is actually an error in the README that I need to fix.  With Fedora 8, you
no longer set deltaurl.  Instead, set the baseurl to be
http://lesloueizeh.com/f8/i386/updates.

I'll close this bug once I've pushed an update with a more sane README.

Comment 3 Rohan Dhruva 2007-11-11 14:34:24 UTC
Hi .. Thanks for clearing that up, though I still have one doubt - where do I
set the 'baseurl' ? 

In /etc/yum/pluginconf.d/presto.conf or in the /etc/yum.repos.d/fedora.repo ? 

Comment 4 Jonathan Dieter 2007-11-11 15:13:38 UTC
In this case, in /etc/yum.repos.d/fedora-updates.repo (as the deltarpms are for
the updates).

Comment 5 Rohan Dhruva 2007-11-11 19:11:43 UTC
Even after doing that, I'm not sure if it is getting the updates from the DRPMS
- seeing the DRPMS directory, the latest update available for anthy is - 

anthy-9100b-1.fc8_9100d-1.fc8.i386.drpm	08-Nov-2007 21:10 	1.8M

yet, yum is fetching this update (from
http://lesloueizeh.com/f8/i386/updates/updates/) -

anthy.i386                               9100d-1.fc8            updates 

Do I still need to do something special to force it to fetch the DRPM updates
only ? I'm attaching my fedora-updates.repo

Comment 6 Rohan Dhruva 2007-11-11 19:13:12 UTC
Created attachment 254791 [details]
My presto-enabled fedora-updates.repo

Comment 7 Jonathan Dieter 2007-11-12 08:35:59 UTC
Your configuration looks fine.  I'd try running rpm -V anthy and see if
anything's changed.

Also, you won't know whether you're getting a deltarpm until the download
actually starts.  Putting the * next to the deltarpms was a bit of a hack, so
we've removed it.

Comment 8 Rohan Dhruva 2007-11-12 20:03:15 UTC
Ah ok, it was my mistake. Everything is working great now .. Thanks !

Comment 9 Rohan Dhruva 2007-11-12 20:13:14 UTC
Oops spoken to soon I guess ! I got a few errors with yum update and
setroubleshoot. I'm attaching the the 3 setroubleshoot reports, a setroubleshoot
screenshot, and "problem.txt" which is my console dump. Please tell me if it is
a mistake I made, or a bug ? 

Comment 10 Jonathan Dieter 2007-11-12 20:31:46 UTC
The reports, screenshot and dump would be much appreciated. :)

Comment 11 Rohan Dhruva 2007-11-12 21:06:51 UTC
Created attachment 255771 [details]
The said attachment

I'm SO sorry, I had the tarball ready while typing the comment, but just forgot
to attach it ! Here it is .. :)

Comment 12 Jonathan Dieter 2007-11-13 15:14:02 UTC
Okay, it seems like something isn't quite right, but I'm not an SELinux expert,
so I'm not sure whether this is a yum-presto error or a yum error (or a problem
with bad selinux labeling).  What happens when you run yum --disablepresto update?

Comment 13 Rohan Dhruva 2007-11-13 18:53:54 UTC
With yum --disablepresto update no errors/warnings appear. Also, what's very
surprising is that even with --disablepresto the amount of mb's to be downloaded
is the same - in this case 18mb. Am I going wrong somewhere ?

Comment 14 Jonathan Dieter 2007-11-14 14:44:22 UTC
No, the total amount downloaded is no longer recalculated using the deltarpms. 
You will also no longer get a summary of what you've saved.  Don't worry, it's
still working (except for the SELinux errors you've mentioned, and I *am*
looking into them).

Comment 15 Rohan Dhruva 2007-11-14 15:23:34 UTC
Oh ok, I must say it was really nice to have those statistics printed ! ;)
Anyway, please tell me if you require any more debugging with this SELinux issue ..

Comment 16 Jonathan Dieter 2007-11-14 16:22:12 UTC
I've checked on the fedora-devel mailing list, and it looks like the best way to
get this fixed would be to open a new bug under selinux-policy and have the
SELinux guys look at it.

I could do that, but I think it would probably be better if you opened it, as
Daniel Walsh will probably want information from you directly.

Again, I'll leave this bug open until I come up with a more sane README file.

Sorry about the statistics (and they may come back), but our priorities at the
moment are on keeping everything simple.

Comment 17 Daniel Walsh 2007-11-14 16:57:01 UTC
Well in selinux-policy-3.0.8-54 prelink will be able to do all of these
activities so these avc's will dissapear.  There is a couple of curious things
there though.  

This AVC
avc: denied { read write } for comm=prelink dev=sockfs path=socket:[59142]
pid=7501 scontext=unconfined_u:system_r:prelink_t:s0 tclass=unix_dgram_socket
tcontext=unconfined_u:system_r:rpm_t:s0

Indicates prelink is trying to read/write a unix_dgram_socket owned by rpm_t
(yum).  So I think you have a leaked file descriptor.  All file descriptors
should be closed on exec.  

The second curouts thing is prelink seems to be a

Comment 18 Jonathan Dieter 2007-11-14 17:18:25 UTC
Okay, I think I tracked the first problem in #17 down.  We were using
subprocess.call() while close_fds was False.  I've changed it so that close_fds
is True, so hopefully we will no longer be leaking any file descriptors.

It looks like the second curious thing was cut off, but if you tell me what it
is, I'll try to find and fix it.

Comment 19 Daniel Walsh 2007-11-14 17:23:28 UTC
I think the fact this is the first time I am seeing AVC's about appending to
rpm_log_t for processes running in the postinstall scripts.

Comment 20 Jonathan Dieter 2007-11-14 17:49:17 UTC
I don't think the prelink process is being called from inside %postinstall, but
rather from the yum-presto plugin.  Maybe this problem has been fixed in the
last fix.

Rohan, do you mind grabbing
https://hosted.fedoraproject.org/projects/presto/browser/yum-presto/presto.py
(you may have to wait a few minutes before my changes come through), putting it
in /usr/lib/yum-plugins and then trying the update again?

Comment 21 Rohan Dhruva 2007-11-14 20:40:20 UTC
I hope I dont look foolish asking, but is there some way I can download that
file ? In the bottom of the page there is an option to download, but whenever I
click on either Plain or Original, Tracker gives me an error .. And copy pasting
that file would not work too, because of the line numbers !

Comment 22 Rohan Dhruva 2007-11-14 20:42:13 UTC
Also, this time around, there no packages marked for upgrade .. Any idea how can
I manually force-downgrade a package and then have yum upgrade it ? Or some
other way in which I can re-create the above situation ?

Comment 23 I. Piasecki 2007-11-15 00:13:04 UTC
(In reply to comment #16)
> I've checked on the fedora-devel mailing list, and it looks like the best way to
> get this fixed would be to open a new bug under selinux-policy and have the
> SELinux guys look at it.
> 
> I could do that, but I think it would probably be better if you opened it, as
> Daniel Walsh will probably want information from you directly.
> 
> Again, I'll leave this bug open until I come up with a more sane README file.
> 
> Sorry about the statistics (and they may come back), but our priorities at the
> moment are on keeping everything simple.

Please, keep statistic running. It is very nice to see, how many biytes are save
from bandwith usage, when presto is enabled. Presto is superb idea - don't make
it too simply in info display for the user.

Comment 24 Jonathan Dieter 2007-11-15 07:16:00 UTC
Created attachment 259551 [details]
Updated presto.py

I don't know what's up with Trac, but obviously something's not working right. 
Anyhow, here's the updated presto.py.  Save it into /usr/lib/yum-plugins.

As for the other, I would do rpm -U --oldpackage /location/of/old/anthy.rpm (or
something like that).  Make sure you rerun prelink (prelink -a) before running
yum update.  Also, make sure you didn't save the updated package in your yum
cache from the last time (otherwise yum will use that and skip using
yum-presto).

Comment 25 Jonathan Dieter 2007-11-15 07:20:51 UTC
(In reply to comment #23)
> Please, keep statistic running. It is very nice to see, how many biytes are save
> from bandwith usage, when presto is enabled. Presto is superb idea - don't make
> it too simply in info display for the user.

I do like the statistics, but it will probably take a little while before I get
some form of them back in.

Comment 26 Rohan Dhruva 2007-11-15 09:14:22 UTC
Created attachment 259631 [details]
Errors still persist

Jonathan,

Even after replacing yum.py with the attached one, I updated a single package
and got an AVC denial .. Attaching the logs .. I did prelink -a before running
the command. But I noticed that this time around I got a SIGNIFICANTLY less
number of denials - just one .. Then again it might be because I updated only a
single package :)

Comment 27 Jonathan Dieter 2007-11-15 09:43:54 UTC
Okay, that's actually good.  It looks like the two odd AVC denials were fixed,
so I think we just need to wait on selinux-policy-3.0.8-54.  I just checked
updates-testing and it's not there yet.

When it comes out, please test it using the same method (and the same package,
if you want) and see if it fixes the problem.

Comment 28 Rohan Dhruva 2007-11-15 11:03:29 UTC
OK will do ! 

Comment 29 Rohan Dhruva 2007-11-16 19:56:19 UTC
I just did yum update and got selinux-policy-3.0.8-53 .. I also downgraded
gnome-desktop and updated it using yum (after a yum clean all) and I don't get
any SELinux policy denials or AVC violations .. Absolutely none :) I think a
combination of the new selinux-policy and the new presto.py did it ? Great work :)

Comment 30 Fedora Update System 2007-11-20 17:53:12 UTC
yum-presto-0.4.3-1.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum-presto'

Comment 31 Fedora Update System 2007-12-06 20:45:53 UTC
yum-presto-0.4.3-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.


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