Bug 1476000

Summary: Running lorax inside mock fails with error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
Product: [Fedora] Fedora Reporter: Brian Lane <bcl>
Component: mockAssignee: Clark Williams <williams>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jdisnard, jkonecny, mebrown, msimacek, msuchy, praiskup, williams
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-06 21:37:55 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:
Embargoed:

Description Brian Lane 2017-07-27 18:58:29 UTC
Using mock-1.4.2-1.fc25.noarch I am seeing problems running lorax.

Running the following:
  mock -r fedora-rawhide-x86_64 --init
  mock -r fedora-rawhide-x86_64 --install lorax
  mock -r fedora-rawhide-x86_64 --chroot "lorax -p Fedora -v 27 -r 27 -s http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/ /builddir/results/"

It runs normally, installing packages, until it hits the point where lorax chroots into the new installtree and tries to run rpm -qa:


2017-07-27 11:46:49,931: running runtime-postinstall.tmpl
running runtime-postinstall.tmpl

2017-07-27 11:46:50,184: command returned failure (1)
command returned failure (1)
2017-07-27 11:46:50,184: template command error in runtime-postinstall.tmpl:
template command error in runtime-postinstall.tmpl:
2017-07-27 11:46:50,185:   runcmd chroot /var/tmp/lorax.tkabpaqa/installtree /usr/bin/rpm -qa --pipe tee /root/lorax-packages.log
  runcmd chroot /var/tmp/lorax.tkabpaqa/installtree /usr/bin/rpm -qa --pipe tee /root/lorax-packages.log
2017-07-27 11:46:50,186:   subprocess.CalledProcessError: Command '['chroot', '/var/tmp/lorax.tkabpaqa/installtree', '/usr/bin/rpm', '-qa', '--pipe', 'tee /root/lorax-packages.log']' returned non-zero exit status 1.

command output:
error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db5 -  (-30969)
error: cannot open Packages database in /var/lib/rpm
error: db5 error(-30969) from dbenv->open: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db5 -  (-30969)
error: cannot open Packages database in /var/lib/rpm


But if I run:
mock -r fedora-rawhide-x86_64 --no-clean --chroot "chroot /var/tmp/lorax.tkabpaqa/installtree /usr/bin/rpm -qa"

it runs fine.

I have also tried running it under mock --old-chroot, but that results in the same error. This all used to work, and lorax has changed very little lately, so I'm pretty sure the problem lies with mock.

Comment 1 Miroslav Suchý 2017-08-06 21:37:55 UTC

*** This bug has been marked as a duplicate of bug 1299482 ***