Bug 1335210 - agent package does not rotate logs
Summary: agent package does not rotate logs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Storage Console
Classification: Red Hat Storage
Component: agent
Version: 2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 2
Assignee: gowtham
QA Contact: Martin Kudlej
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-11 15:10 UTC by Ken Dreyer (Red Hat)
Modified: 2018-11-19 05:31 UTC (History)
4 users (show)

Fixed In Version: rhscon-ceph-0.0.23-1.el7scon.x86_64, rhscon-core-0.0.24-1.el7scon.x86_64, rhscon-ui-0.0.39-1.el7scon.noarch
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-19 05:31:47 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1325340 0 unspecified CLOSED log management missing 2021-02-22 00:41:40 UTC

Internal Links: 1325340

Description Ken Dreyer (Red Hat) 2016-05-11 15:10:41 UTC
Description of problem:
The agent package logs to /var/log/skynet/skynet.log , but there is nothing that rotates this file.

Version-Release number of selected component (if applicable):
rhscon-agent-0.0.6-1

How reproducible:
always

Steps to Reproduce:
1. yum install rhscon-agent
2. systemctl enable skynetd
3. systemctl start skynetd


Actual results:
Information gets written to /var/log/skynet/skynet.log , and if a lot of information is written here, it will grow without bound and never be rotated.

Expected results:
Log to the systemd journal instead (or add logrotation config).

Additional info:
I definitely recommend that you avoid logging to a plaintext file at all, and simply write your logging information to STDOUT/STDERR, so that it will go into systemd-journald. This is how we do it with ceph-installer.service and ceph-installer-celery.service:

  StandardOutput=journal
  StandardError=journal

Then you can view your logs with "journalctl -u skynetd" instead of reading skynet.log, and you get rotation for free, etc.

Comment 2 Martin Kudlej 2016-08-03 13:36:34 UTC
Tested with
calamari-server-1.4.8-1.el7cp.x86_64
ceph-base-10.2.2-33.el7cp.x86_64
ceph-common-10.2.2-33.el7cp.x86_64
ceph-mon-10.2.2-33.el7cp.x86_64
ceph-selinux-10.2.2-33.el7cp.x86_64
libcephfs1-10.2.2-33.el7cp.x86_64
python-cephfs-10.2.2-33.el7cp.x86_64
rhscon-agent-0.0.16-1.el7scon.noarch
rhscon-core-selinux-0.0.39-1.el7scon.noarch
and it works.


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