Bug 1028352 - corrupts yum cache
corrupts yum cache
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Clark Williams
Fedora Extras Quality Assurance
Depends On:
Blocks: 1028332
  Show dependency treegraph
Reported: 2013-11-08 04:36 EST by Björn 'besser82' Esser
Modified: 2014-07-23 02:55 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-07-23 02:55:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Björn 'besser82' Esser 2013-11-08 04:36:45 EST
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):


How reproducible:


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 15:38:31 EST
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 11:11:25 EST
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 12:25:10 EST
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 11:38:03 EST
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 13:30:26 EST
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
$ rpm -q yum

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 14:22:33 EST


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

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 10:46:18 EST
Created attachment 836358 [details]
review output from f18 box
Comment 8 Wolfgang Ulbrich 2013-12-13 10:47:20 EST
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 10:48:33 EST
Created attachment 836359 [details]
review output from f19 box
Comment 10 Björn 'besser82' Esser 2013-12-13 10:53:02 EST
(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 11:08:55 EST
Created attachment 836371 [details]
review output from f20 box
Comment 12 Wolfgang Ulbrich 2013-12-13 12:27:18 EST
For your info, downgrading mock in f18 helps to solve the issue.
Comment 13 Wolfgang Ulbrich 2013-12-29 06:16:53 EST
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 15:55:35 EST
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 02:55:47 EDT
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.