Bug 1965147
Summary: | Errors are reported when using virt-v2v to convert SUSE Linux Enterprise Server 11 SP4 guest | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | xinyli | ||||||
Component: | rpm | Assignee: | Michal Domonkos <mdomonko> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Tomáš Bajer <tbajer> | ||||||
Severity: | low | Docs Contact: | |||||||
Priority: | high | ||||||||
Version: | 9.0 | CC: | chhu, juzhou, mdomonko, mxie, pmatilai, rjones, tbajer, tyan, tzheng, vwu, xiaodwan | ||||||
Target Milestone: | rc | Keywords: | Triaged | ||||||
Target Release: | 9.0 Beta | ||||||||
Hardware: | x86_64 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | rpm-4.16.1.3-9.el9 | Doc Type: | No Doc Update | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2022-05-17 16:01:23 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: | |||||||||
Attachments: |
|
Description
xinyli
2021-05-27 02:00:20 UTC
The problem is that for this guest inspect_list_applications2 returns an empty list in RHEL 9 (but returns correctly in RHEL 8). Because virt-v2v believes there are no kernel packages installed, the conversion fails immediately. The problem specifically happens because librpm in RHEL 9 does not understand the RPM database in this SLES 11 guest. It gives these errors: guestfsd: <= internal_list_rpm_applications (0x1fe) request length 40 bytes command: mount returned 0 chroot: /sysroot: running 'librpm' warning: could not open /var/lib/rpm/Obsoletename: No such file or directory warning: could not open /var/lib/rpm/Filetriggername: No such file or directory warning: could not open /var/lib/rpm/Transfiletriggername: No such file or directory warning: could not open /var/lib/rpm/Recommendname: No such file or directory warning: could not open /var/lib/rpm/Suggestname: No such file or directory warning: could not open /var/lib/rpm/Supplementname: No such file or directory warning: could not open /var/lib/rpm/Enhancename: No such file or directory error: bdb_ro error reading Name database error: bdb_ro error reading Packages database librpm returned 0 installed packages guestfsd: => internal_list_rpm_applications (0x1fe) took 0.16 secs libguestfs: trace: v2v: internal_list_rpm_applications = <struct guestfs_application2_list(0)> libguestfs: trace: v2v: inspect_list_applications2 = <struct guestfs_application2_list(0)> Note that in RHEL 8 we used to parse the RPM DB directly, librpm was not involved, so I don't know if this is a regression in librpm. Can you attach a tarball of the failing rpmdb for inspection? The bdb_ro backend is new and not so widely tested in real world, it's not a huge surprise if there are some bugs left. This is not a fix, but I've added a better error message upstream: https://github.com/libguestfs/virt-v2v/commit/6f9fc0992555fab0f614940826bec1b8ff9a65b7 Created attachment 1787621 [details] bz1965147-rpmdb.tar.xz ACK, easily reproduced with that, thanks. My first educated guess is that bdb_ro is not correctly handling BDB hash version 8, as running db_upgrade on the files (which updates them to hash 9) makes them readable by bdb_ro. Reassigning to rpm. Proposed fix in https://github.com/rpm-software-management/rpm/pull/1699 FYI, the above fix landed in Fedora rawhide today (rpm >= 4.17.0 beta1) if you want to test it. (In reply to Panu Matilainen from comment #8) > FYI, the above fix landed in Fedora rawhide today (rpm >= 4.17.0 beta1) if > you want to test it. Sorry, realised that I didn't get around to testing this :-( Using: rpm-4.17.0-1.fc36.x86_64 and the guest from comment 4 ("SUSE Linux Enterprise Server 11 SP4"): $ virt-inspector --format=raw -a nbd://localhost The output was too long for me to paste here, but it includes the expected set of <application> elements, indicating that the new version of RPM is working great. From our point of view the warnings do not matter. They will be converted to libguestfs debug output and hidden away for most users or available for those who enable debugging. Please don't hold up this change because of a warning. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (new packages: rpm), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:4021 |