Bug 1663817

Summary: No size limitation for rhsm.log file
Product: Red Hat Enterprise Linux 8 Reporter: Eko <hsun>
Component: virt-whoAssignee: William Poteat <wpoteat>
Status: CLOSED ERRATA QA Contact: Eko <hsun>
Severity: low Docs Contact:
Priority: low    
Version: 8.0CC: jsefler, khowell, kuhuang, wpoteat, yuefliu
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 02:31:46 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 Eko 2019-01-07 07:27:48 UTC
We create a test case to test the max size of rhsm.log:

1. configure virt-who, make sure there are lots of guests in the hypervisor.

2. restart virt-who service frequently

3. check /var/log/rhsm/rhsm.log size


we found that virt-who will continue to add log message to rhsm.log file even the file's size is more than 1GB. 
# ls /var/log/rhsm/rhsm.log  -lha
-rw-r--r-- 1 root root 1.2G Jan  4 18:21 /var/log/rhsm/rhsm.log


Expected results:
There should be limitation for the rhsm.log file size.

Comment 1 William Poteat 2020-05-08 13:52:29 UTC
The log rotation is handled in subscription-manager and was fixed by https://bugzilla.redhat.com/show_bug.cgi?id=1803783

You will need to confirm this fix in RHEL 8.3, any 1.27 build will have it.

Comment 4 Eko 2020-08-17 07:53:13 UTC
Verified with 
 virt-who-0.29.3-1.el8.noarch
 subscription-manager-1.27.13-1.el8.x86_64

# cat /etc/logrotate.d/subscription-manager 
/var/log/rhsm/*.log {
    missingok
    notifempty
    sharedscripts
    copytruncate
}

# systemctl restart virt-who

# logrotate -f /etc/logrotate.conf

# ll
total 12
-rw-r--r-- 1 root root     0 Aug 17 07:50 rhsm.log
-rw-r--r-- 1 root root 11703 Aug 17 07:50 rhsm.log-20200817

Comment 7 errata-xmlrpc 2020-11-04 02:31:46 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 (virt-who bug fix and enhancement update), 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-2020:4632