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 1130268

Summary: [RFE] preserve rhsm.log from anaconda install after install (ala anaconda logs)
Product: Red Hat Enterprise Linux 7 Reporter: Adrian Likins <alikins>
Component: anacondaAssignee: Brian Lane <bcl>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.1CC: bkearney, hartsjc, mbanas, salmy
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: anaconda-21.48.22.57-1 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 23:06:11 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 Flags
copy rhsm logs at the end of the installation none

Description Adrian Likins 2014-08-14 17:42:40 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1123014#c5

Would be useful to preserve any rhsm logs generated by productid.py yum plugin doing anaconda.

That may be an anaconda change to copy it over. 

And/or, changing the code to understand running under one / (including logging), and updating to another chroot. 

My preference would be to just copy it afterwards, to avoid complicating the already complicated chroot handling for the main subman code (most of which isn't used in anaconda).

Comment 2 John Sefler 2014-10-28 17:37:53 UTC
This feature request was not implemented and delivered to QE by the rhel-7.1.0 Dev Freeze date of 10/27/2014.  Deferring for consideration in next release.

Comment 3 James Hartsock 2015-02-23 19:33:20 UTC
Someone asked me where this occurs during anaconda, so thought would doc it in here in case others interested in what I found.

# grep 'anaconda version' /tmp/anaconda.log 
18:53:22,570 INFO    : anaconda version 13.21.229 on x86_64 starting

# grep -lR productid /mnt/runtime/usr/
/mnt/runtime/usr/lib/yum-plugins/product-id.py
/mnt/runtime/usr/share/cracklib/pw_dict.pwd
/mnt/runtime/usr/share/rhsm/subscription_manager/certdirectory.py
/mnt/runtime/usr/share/rhsm/subscription_manager/managerlib.py
/mnt/runtime/usr/share/rhsm/subscription_manager/productid.py <--------


# cut -d, -f2- /var/log/rhsm/rhsm.log  
696 [ERROR] anaconda @plugins.py:896 - Could not find /usr/share/rhsm-plugins for plugin import
696 [DEBUG] anaconda @plugins.py:569 - loaded plugin modules: []
696 [DEBUG] anaconda @plugins.py:570 - loaded plugins: {}
730 [WARNING] anaconda @productid.py:736 - Error loading productid metadata for RHEL - Optional.
731 [WARNING] anaconda @productid.py:736 - Error loading productid metadata for RHEL - RH Common.
882 [DEBUG] anaconda @productid.py:408 - Checking for product id certs to install or update.
883 [DEBUG] anaconda @productid.py:428 - product cert: 69 repo: RHEL
883 [DEBUG] anaconda @productid.py:428 - product cert: 69 repo: anaconda-RedHatEnterpriseLinux-201409260744.x86_64
883 [DEBUG] anaconda @productid.py:428 - product cert: 69 repo: RHEL - RHEV Agents
883 [DEBUG] anaconda @productid.py:428 - product cert: 69 repo: RHEL - Supplementary
883 [INFO] anaconda @productid.py:518 - Updating product db with 69 -> RHEL
883 [INFO] anaconda @productid.py:518 - Updating product db with 69 -> anaconda-RedHatEnterpriseLinux-201409260744.x86_64
883 [INFO] anaconda @productid.py:518 - Updating product db with 69 -> RHEL - RHEV Agents
884 [INFO] anaconda @productid.py:569 - Installed product cert 69: Red Hat Enterprise Linux Server /mnt/sysimage/etc/pki/product/69.pem
884 [INFO] anaconda @productid.py:569 - Installed product cert 69: Red Hat Enterprise Linux Server /mnt/sysimage/etc/pki/product/69.pem
885 [INFO] anaconda @productid.py:569 - Installed product cert 69: Red Hat Enterprise Linux Server /mnt/sysimage/etc/pki/product/69.pem
885 [DEBUG] anaconda @productid.py:546 - about to run post_product_id_install
885 [DEBUG] anaconda @productid.py:557 - about to run post_product_id_update

#  ls -la /mnt/sysimage/var/log/rhsm/rhsm.log 
ls: cannot access /mnt/sysimage/var/log/rhsm/rhsm.log: No such file or directory





Base on timestamps, looks to happen after the dracut build at the end of anaconda, but before the kickstart %post script.
# tail -n 2 /mnt/sysimage/var/log/dracut.log
Mon Feb 23 12:59:21 CST 2015 Info: Wrote /boot/initramfs-2.6.32-504.el6.x86_64.img
Mon Feb 23 12:59:21 CST 2015 Info: -rw-------. 1 root root 19126246 Feb 23 12:59 /boot/initramfs-2.6.32-504.el6.x86_64.img

# head -n 1 /var/log/rhsm/rhsm.log  
2015-02-23 12:59:22,696 [ERROR] anaconda @plugins.py:896 - Could not find /usr/share/rhsm-plugins for plugin import

# grep -B1 post-start /tmp/program.log 
13:00:24,596 INFO    : Running... ['/bin/bash', '/tmp/ks-script-l48fxF']
13:00:24,609 INFO    : post-start at Mon Feb 23 13:00:24 CST 2015

Comment 4 Brian Lane 2015-07-09 16:44:05 UTC
Created attachment 1050368 [details]
copy rhsm logs at the end of the installation

Comment 5 Brian Lane 2015-10-21 16:22:26 UTC
Proposed patch - https://github.com/rhinstaller/anaconda/pull/420

Comment 9 errata-xmlrpc 2016-11-03 23:06:11 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://rhn.redhat.com/errata/RHEA-2016-2158.html