Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1462979

Summary: /var/lib/rpm setup broken for RHELAH 7.4 cloud image
Product: Red Hat Enterprise Linux 7 Reporter: Micah Abbott <miabbott>
Component: anacondaAssignee: Colin Walters <walters>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: ajia, ghuang, jstodola, pkotvan, rvykydal, sbueno, tlavigne
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: anaconda-21.48.22.221-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 08:57:18 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 Micah Abbott 2017-06-19 19:30:21 UTC
After booting the most recent 7.4 cloud image (rhel-atomic-cloud-7.4.0-5.x86_64.qcow2) which corresponds to the ostree commit 0b62181fb3, I'm unable to query the RPM database:


# atomic host status
State: idle
Deployments:
● rhel-atomic-host:rhel-atomic-host/7/x86_64/standard
                Version: 7.4.0 (2017-06-16 21:48:31)
                 Commit: 0b62181fb351d26ebb794438174c8dbc2ea5cc4c04c589b7be82e15695a2bbbb
# rpm -qa
# echo $?
0

# ls -l /var/lib/rpm
total 360
-rw-r--r--. 1 root root   8192 Jun 16 22:53 Basenames
-rw-r--r--. 1 root root   8192 Jun 16 22:53 Conflictname
-rw-r--r--. 1 root root 286720 Jun 19 19:22 __db.001
-rw-r--r--. 1 root root  90112 Jun 19 19:22 __db.002
-rw-r--r--. 1 root root  57344 Jun 19 19:22 __db.003
-rw-r--r--. 1 root root   8192 Jun 16 22:53 Dirnames
-rw-r--r--. 1 root root   8192 Jun 16 22:53 Group
-rw-r--r--. 1 root root   8192 Jun 16 22:53 Installtid
-rw-r--r--. 1 root root   8192 Jun 16 22:53 Name
-rw-r--r--. 1 root root   8192 Jun 16 22:53 Obsoletename
-rw-r--r--. 1 root root  12288 Jun 16 22:53 Packages
-rw-r--r--. 1 root root   8192 Jun 16 22:53 Providename
-rw-r--r--. 1 root root   8192 Jun 16 22:53 Requirename
-rw-r--r--. 1 root root   8192 Jun 16 22:53 Sha1header
-rw-r--r--. 1 root root   8192 Jun 16 22:53 Sigmd5
-rw-r--r--. 1 root root   8192 Jun 16 22:53 Triggername



This is different when compared to a 7.3 RHELAH host:

# atomic host status
State: idle
Deployments:
● custom:rhel-atomic-host/7/x86_64/standard
             Version: 7.3.5 (2017-05-22 22:00:44)
              Commit: 0ccf9138962e5c2c3794969a228e751d13bb780f5b0a1f15f4a9649df06ba80a

# rpm -qa | wc -l
418
# ls -l /var/lib/rpm
lrwxrwxrwx. 1 root root 19 Feb 27 20:36 /var/lib/rpm -> ../../usr/share/rpm

Comment 2 Colin Walters 2017-06-20 01:15:08 UTC
I confirmed this doesn't affect an ISO install, so it's likely specific to us doing something like this bit in the cloud kickstart:

```
# Additional drivers for vmware and hyperv
echo 'add_drivers+="mptspi vmw_pvscsi "'    > /etc/dracut.conf.d/vmware-fusion-drivers.conf
echo 'add_drivers+="hv_storvsc hv_netvsc "' > /etc/dracut.conf.d/hyperv-drivers.conf
# Rerun dracut for the installed kernel (not the running kernel):
KERNEL_VERSION=$(rpm -q kernel --qf '%{V}-%{R}.%{arch}\n')
dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
```

Comment 3 Colin Walters 2017-06-20 15:28:01 UTC
Hm, no this did happen to me with an ISO install.  Something (most likely in Anaconda code) is using librpm and hence creating /var/lib/rpm in the installer, before the symlink is set up.

Comment 4 Colin Walters 2017-06-20 18:47:36 UTC
https://github.com/rhinstaller/anaconda/pull/1110

Comment 8 Colin Walters 2017-06-23 13:01:42 UTC
*** Bug 1464363 has been marked as a duplicate of this bug. ***

Comment 9 Scott Dodson 2017-06-23 14:09:31 UTC
*** Bug 1464376 has been marked as a duplicate of this bug. ***

Comment 11 errata-xmlrpc 2017-08-01 08:57:18 UTC
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, 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-2017:2293