Bug 1028352 - corrupts yum cache
Summary: corrupts yum cache
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 20
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1028332
TreeView+ depends on / blocked
 
Reported: 2013-11-08 09:36 UTC by Björn 'besser82' Esser
Modified: 2014-07-23 06:55 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-23 06:55:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
review output from f18 box (173.74 KB, text/plain)
2013-12-13 15:46 UTC, Wolfgang Ulbrich
no flags Details
review output from f19 box (72.42 KB, text/plain)
2013-12-13 15:48 UTC, Wolfgang Ulbrich
no flags Details
review output from f20 box (23.19 KB, text/plain)
2013-12-13 16:08 UTC, Wolfgang Ulbrich
no flags Details
use new repoquery argument --installroot to avoid yum cache corruption (2.91 KB, patch)
2014-01-04 20:55 UTC, Clark Williams
no flags Details | Diff

Description Björn 'besser82' Esser 2013-11-08 09:36:45 UTC
Description of problem:

  running mock with a dist different from the installed one, corrupts
  yum's cache until `yum clean all` is invoked manually.


Version-Release number of selected component (if applicable):

  mock-1.1.35-1.fc20.noarch


How reproducible:

  100%


Steps to Reproduce:

  1. invoke e.g. `mock --clean --init -r fedora-rawhide-$arch`
  2. invoke `yum makecache` ---> BANG!
  3. invoke `yum clean all`
  4. `yum makecache` runs fine again


Actual results:

  yum's cache get corrupted by running mock with a different dist,
  e.g. rawhide.


Expected results:

  yum's cache keeps in a valid and working state after using mock.


Additional info:

  mock-1.1.33-1.fc20.noarch works fine.  No issues with that version.  :)

  If you are affected by this do `yum downgrade mock` and everything is
  fine again.

Comment 1 Clark Williams 2013-11-08 20:38:31 UTC
I tried the reproducer steps on my f19 box and did not have any problems with running 'yum makecache'.

Can you post the output of the failure when yum blows up on your system?

Comment 2 Alec Leamas 2013-11-12 16:11:25 UTC
This might possibly  be related  to the default.cfg being stale after update:

$ ls -l /etc/mock/default.cfg
lrwxrwxrwx 1 root root 18 31 okt 13.07 /etc/mock/default.cfg -> fedora--x86_64.cfg

which was the case when I run into this.

Comment 3 Alec Leamas 2013-11-12 17:25:10 UTC
Have been trying to reproduce this on a machine where it happened, but no joy. My interpretation is that when I linked default.cfg the condition triggering the error was disabled. And it's not that simple that creating a new stale default.cfg re-introduces it.

Still, this have been a verified on at least three machines, so the report is valid.

besser82: Can you reproduce this after linking /etc/mock/default.cfg to a proper configuration in /etc/mock?

Comment 4 Timothy St. Clair 2013-12-03 16:38:03 UTC
Repro's 100% on fedora 20 for me.  I see the exact same issue, changing the link under mock has no effect.

Comment 5 Clark Williams 2013-12-03 18:30:26 UTC
I've tried to reproduce this on my f19 development system multiple times and never had it fail. Can someone that does have a failure please post:

1. The command line for all commands run to reproduce the failure
2. The version of mock and yum installed
3. The complete output of the commands so that I can see what the failure says

I've been trying to reproduce with:

$ rpm -q mock
mock-1.1.35-1.fc19.noarch
$ rpm -q yum
yum-3.4.3-111.fc19.noarch

To no avail. Running:

$ mock --clean --init -r fedora-rawhide-x86_64
$ mock makecache

showed no failures. 

I'll go in search of an f20 box to try this on...

Comment 6 Timothy St. Clair 2013-12-03 19:22:33 UTC
versions: 

yum-3.4.3-106.fc20
mock-1.1.35-1.fc20

-----------------------------------------
output failure pattern (aka BANG): 
<repeated attempts to check mirrors> 
[Errno 14] HTTP Error 404 - Not Found

e.g.
http://ftp.lip6.fr/ftp/pub/linux/distributions/fedora/development/20/x86_64/os/repodata/6475e242d6b3ea685a85ad139f6a022c15422622725d5271d600d5b68ef8d545-filelists.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found

-----------------------------------------
Confirmed that `sudo yum downgrade mock-1.1.33-1.fc20.noarch.rpm` is a functional workaround.  

See also: https://bugzilla.redhat.com/show_bug.cgi?id=1028332

Comment 7 Wolfgang Ulbrich 2013-12-13 15:46:18 UTC
Created attachment 836358 [details]
review output from f18 box

Comment 8 Wolfgang Ulbrich 2013-12-13 15:47:20 UTC
Seems this issue also affect fedora-review tool running against rawhide in f18/19/20.
I used this command line in f20/19/18 to review a local srpm.
fedora-review  -v -r -n marco -m fedora-rawhide-x86_64

In the install part of fedora-review yum try to download f18 packages if host is f18, f19 packages if host is f19 and f20 packages if host is f20.

Comment 9 Wolfgang Ulbrich 2013-12-13 15:48:33 UTC
Created attachment 836359 [details]
review output from f19 box

Comment 10 Björn 'besser82' Esser 2013-12-13 15:53:02 UTC
(In reply to Wolfgang Ulbrich from comment #8)
> In the install part of fedora-review yum try to download f18 packages if
> host is f18, f19 packages if host is f19 and f20 packages if host is f20.

Wolfgang you are mistaking here.  :(  It actually tries to download the rawhide-metadata from the location of the dist it is running on...

Comment 11 Wolfgang Ulbrich 2013-12-13 16:08:55 UTC
Created attachment 836371 [details]
review output from f20 box

Comment 12 Wolfgang Ulbrich 2013-12-13 17:27:18 UTC
For your info, downgrading mock in f18 helps to solve the issue.

Comment 13 Wolfgang Ulbrich 2013-12-29 11:16:53 UTC
With current version in f20 yumex shows me evertime updates for f21 after mock was running.
I need to run 'yum clean metadata' to fix this.
With mock-1.1.33-1.fc20.noarch.rpm i don't see this issue.

Comment 14 Clark Williams 2014-01-04 20:55:35 UTC
Created attachment 845545 [details]
use new repoquery argument --installroot to avoid yum cache corruption

Applied this patch to make use of new repoquery parameter --installroot. This should avoid corrupting the host yum cache.

Comment 15 Miroslav Suchý 2014-07-23 06:55:47 UTC
mock-1.1.41 (which should contain this fix) is in stable


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