Bug 1130268 - [RFE] preserve rhsm.log from anaconda install after install (ala anaconda logs)
Summary: [RFE] preserve rhsm.log from anaconda install after install (ala anaconda logs)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: anaconda
Version: 7.1
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Brian Lane
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-14 17:42 UTC by Adrian Likins
Modified: 2016-11-03 23:06 UTC (History)
4 users (show)

Fixed In Version: anaconda-21.48.22.57-1
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 23:06:11 UTC


Attachments (Terms of Use)
copy rhsm logs at the end of the installation (814 bytes, patch)
2015-07-09 16:44 UTC, Brian Lane
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:2158 normal SHIPPED_LIVE anaconda bug fix and enhancement update 2016-11-03 13:13:55 UTC

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


Note You need to log in before you can comment on or make changes to this bug.