Bug 660895

Summary: Luci is missing logrotate configuration file (rpmlint: log-files-without-logrotate warning)
Product: [Fedora] Fedora Reporter: Jan Pokorný [poki] <jpokorny>
Component: luciAssignee: Jan Pokorný [poki] <jpokorny>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 14CC: cfeist, fdinitto, rmccabe
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-13 19:35:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 660446    
Bug Blocks:    

Description Jan Pokorný [poki] 2010-12-07 18:17:26 UTC
Adding this configuration file with more-or-less neutral configuration
is considered a good way how to address this.

In addition, if such file is marked as %config(noreplace) in the spec
file, it can be safely modified by the administrator to serve
his/her needs of log files management.

Original rpmlint warning:
luci.x86_64: W: log-files-without-logrotate /var/log/luci
This package contains files in /var/log/ without adding logrotate
configuration for them.


Note: the lack of this file has been fixed in the context of
      work on pkg-update upstream branch which means the fix ties
      closely to the major change brought from this branch into
      main-line upstream code in connection with bug #660446

Comment 1 Jan Pokorný [poki] 2010-12-07 19:58:27 UTC
This should be fixed in http://git.fedorahosted.org/git/?p=luci.git;a=commit;h=4cd87d58ea6268cbfac7a9cf1cd11743d560a411

(As in bug #660446 case, note that this is only a single step amongst others
in merging with pkg-update branch which contains more changes related to luci
packaging, external files etc. and the rest of these changes will be filed
as separated subsequent bugs and commited as separated subsequent patches.)

Comment 2 Jan Pokorný [poki] 2010-12-07 20:14:10 UTC
Correction: this should be fixed as of http://git.fedorahosted.org/git/?p=luci.git;a=commitdiff;h=5c85bd0c4eaf32f8f8f3633e9a9b07dacc41116a
(one change was forgotten in the previous commit).

Comment 3 Jan Pokorný [poki] 2010-12-07 21:44:56 UTC
To test this, basically this sequence (made after installation) will serve its purpose:

# ls -l /etc/logrotate.d/luci 
-rw-r--r--. 1 root root 164 Dec  7 21:08 /etc/logrotate.d/luci
# rpm -qf /etc/logrotate.d/luci 
luci-*
# cat /etc/logrotate.d/luci 
/var/log/luci/luci.log {
    missingok
    notifempty

    create
    postrotate
        /sbin/service luci condrestart 2>/dev/null >/dev/null || :
    endscript
}

And to be sure, a check that respective log file is being used by luci:

# service luci start
# cat /var/log/luci/luci.log
/usr/lib/python2.6/site-packages/tw/core/view.py:223: DeprecationWarning: object.__new__() takes no parameters
  obj = object.__new__(cls, *args, **kw)
Starting server in PID 7591.
serving on 0.0.0.0:8084 view at https://127.0.0.1:8084