Bug 999591

Summary: yum tracebacks when updates repository is on a read-only filesystem
Product: [Fedora] Fedora Reporter: Ian Collier <imc>
Component: yumAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: admiller, alexandermurashkin, ffesti, firas.alkafri, packaging-team-maint, tla, zpavlas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: yum-3.4.3-110.fc19.noarch Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-12 08:37:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
output of yum showing the traceback none

Description Ian Collier 2013-08-21 16:16:03 UTC
Created attachment 788930 [details]
output of yum showing the traceback

Suppose I have a local mirror of the F19 updates mounted read-only via NFS, and a repo file that says:

[Fedora_19_Updates.nfs]
name=Fedora $releasever - $basearch (mirror)
baseurl=file:///mnt/F19/updates/
enabled=1
gpgcheck=1
cost=1
skip_if_unavailable=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

If I try to update from this, yum crashes with a traceback indicating that it was trying to unlink a drpm from the read-only filesystem.  It shouldn't try to remove drpms from file-based repositories.  (Arguably, it shouldn't bother with drpms at all on a file-based repository, or maybe that should be triggered on the "cost" value.)

Since it did actually build the package from the drpm, if I run it again (once for each rpm that needs to be constructed), it will eventually succeed.

yum version: yum-3.4.3-106.fc19.noarch

Comment 1 Zdeněk Pavlas 2013-08-26 11:28:06 UTC
Thanks for the report! It's indeed a bug, but the fix is easy.  I think presto plugin with keepdeltas=0 had the same bug.

Comment 2 Alexander Murashkin 2013-09-11 21:05:07 UTC
> but the fix is easy

What is the fix?

I updated all my servers from F18 to F19 recently. Now I have this problem on all servers

# yum update
...
  File "/usr/lib/python2.7/site-packages/yum/drpm.py", line 256, in _wait
    os.unlink(po.localpath)
OSError: [Errno 30] Read-only file system: '/repo/fedora-updates/19/x86_64/drpms/LibRaw-0.14.8-2.fc19_0.14.8-3.fc19.20120830git98d925.x86_64.drpm'

# rpm -q yum
yum-3.4.3-106.fc19.noarch

In the pathname above /repo is read-only exported NFS filesystem.

Comment 3 Alexander Murashkin 2013-09-11 22:24:25 UTC
It seems that this specific problem has been fixed in

yum-3.4.3-110.fc19.noarch

But yum still handles local repositories badly as it rebuilds rpms from deltarpms (slow process that fills /var/yum/cache disk space). See https://bugzilla.redhat.com/show_bug.cgi?id=1007097