Bug 507188
| Summary: | rpm package database is broken | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Marek Goldmann <mgoldman> |
| Component: | appliance-tools | Assignee: | David Huff <dhuff> |
| Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 12 | CC: | dhuff, rjones, virt-maint |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-12-05 06:49:39 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Marek Goldmann
2009-06-21 14:49:07 UTC
I am not sure this is an Appliance-tools error... I tried to reproduce this issue, I installed a rawhide guest with appliance-creator on a F11 box. Launch the guest in qemu-kvm, with libvirt, log on to the guest via virt viewer, and the RPM db seems to be intact. rpm -Va reports no errors yum search mc works also with out error this may be an issue with libguestfs... -D I was also unable to reproduce using guestfish.... If you can provide the libguestfs commands that were used to create this issue i will try and reproduce.. -D David,
Steps to reproduce are as follows: create an appliance (I'm using JBoss Cloud kickstarts) using appliance-creator.
After that:
[oddthesis@bolek-f11 httpd-appliance]$ guestfish
Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.
Type: 'help' for help with commands
'quit' to quit the shell
><fs> add-drive httpd-appliance-sda.raw
><fs> launch
open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support
><fs> mount /dev/sda1 /
><fs> ls /
.gem
.rnd
bin
boot
dev
etc
home
lib
lib64
lost+found
media
mnt
opt
proc
root
sbin
selinux
srv
sys
tmp
usr
var
><fs> command "yum search mc"
libguestfs: error: error: cannot open Packages index using db3 - No such file or directory (2)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=T
><fs>
This is build on latest Fedora 11 packages.
More info: on Fedora 10 this problem *also* exists, I was wrong when I submitted this ticket.
This problem isn't related to guestfish or libguestfs in general, because when I mount disk using losetup, bind all directories, etc, I get same error.
Another info (maybe most important): I *do not start* this virtual machine using qemu, xen, vmware, etc at all. I'm operating offline, on image disk. Maybe Fedora is clearing in some way its RPM package database while starting, dunno that.
Are you fully mounting every directory that needs to be mounted? For example, suppose that /var is a separate partition. Then in the above example, /var/lib/rpm wouldn't exist, which might cause rpm or yum some problems. You can get virt-inspector to mount everything correctly for you. Just do: guestfish -i httpd-appliance-sda.raw I just have one root partition, so every partition is mounted. There is no way I missed something to mount. I really think that's not libguestfs problem. They key here is obviously the error message itself: cannot open Packages index using db3 Perhaps something like rm /var/lib/__db* ; rpm --initdb ? More accurately, the full error message is: error: cannot open Packages index using db3 - No such file or directory (2) error: cannot open Packages database in /var/lib/rpm I would suggest trying stuff out with virt-rescue and using strace to find out what it's actually missing? Rich, I'm cleaning rpm database every time I want to install a new package. See description of this pb: https://bugzilla.redhat.com/show_bug.cgi?id=507188#c0. What's the difference between rebuilding and initializing a RPM database? But either way it's a workaround IMHO. Rich helped me to debug this issue. We produced a strace log for yum command: http://gist.github.com/213449. The answer is in line 5018. Of course directory "/home/oddthesis/jboss-cloud/build/tmp/imgcreate-zI1Pr5/install_root/var/lib/rpm/Packages" does not exists. It was created by appliance-creator to compose image. Appliance-creator caches somewhere the location of Packages database, or rpm database caches it itself and does not look for /var/lib/rpm/Packages by default. I am trying to clean up some old bugs reported against Appliance-tools. Marek, is this still an issue? It looks like it might be a problem with the way livecd-tools does a yum install? I would be happy to look into this further, however I am not really sure what the next steps would be, any suggestions? Yes, this is still an issue, even in F12. This could be: - appliance-creator bug - livecd-tools bug - yum bug Maybe you should talk with a Yum expert and ask if yum is caching the Packages database path somewhere. If yes, this could be a bug because it should try to find it here: "/var/lib/rpm/Packages". Makes this sense? This message is a reminder that Fedora 11 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 11. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '11'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 11's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 11 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping This message is a reminder that Fedora 12 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 12. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '12'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 12's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 12 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed. |