Project

General

Profile

Bug #4370

frontend log rotation is naming files incorrectly

Added by John Weigand about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
High
Category:
Frontend
Target version:
Start date:
07/19/2013
Due date:
% Done:

0%

Estimated time:
First Occurred:
Occurs In:
Stakeholders:
Duration:

Description

This is occurring in the current master branch.
I will test the v2plus branch next.
Not really sure if it is also occurring in the factory
as that service appears to have a different issue
which I will document separately.

This is the frontend config xml

<process_logs>
   <process_log extension="info" max_days="7.0" max_mbytes="100.0" min_days="1.0" msg_types="INFO,ERR,WARN"/>
   <process_log extension="err" max_days="7.0" max_mbytes="100.0" min_days="1.0" msg_types="ERR,EXCEPTION"/>
   <process_log extension="warn" max_days="7.0" max_mbytes="100.0" min_days="1.0" msg_types="WARN"/>
</process_logs>

This configuration was started on 7/17/13 14:13.

These are the current log entries as of 7/19/13 12:04.

[weigand@cms-xen21 logs]$ ls -l */*
frontend_frontend_service-master/frontend:
total 744
-rw-r--r-- 1 weigand weigand      0 Jul 17 14:13 frontend.err.log
-rw-r--r-- 1 weigand weigand 755177 Jul 19 12:04 frontend.info.log
-rw-r--r-- 1 weigand weigand      0 Jul 17 14:13 frontend.warn.log

frontend_frontend_service-master/group_main:
total 5952
-rw-r--r-- 1 weigand weigand   39415 Jul 19 11:17 main.err.log
-rw-r--r-- 1 weigand weigand  785335 Jul 19 12:04 main.info.log
-rw-r--r-- 1 weigand weigand 1048414 Jul 18 03:39 main.info.log.2013-07-24
-rw-r--r-- 1 weigand weigand 1048558 Jul 18 10:29 main.info.log.2013-07-31
-rw-r--r-- 1 weigand weigand 1048560 Jul 18 17:21 main.info.log.2013-08-07
-rw-r--r-- 1 weigand weigand 1048463 Jul 19 00:10 main.info.log.2013-08-14
-rw-r--r-- 1 weigand weigand 1048481 Jul 19 06:59 main.info.log.2013-08-21
-rw-r--r-- 1 weigand weigand       0 Jul 17 14:13 main.warn.log

Problem 1
-----------
Unless I am misinterpreting the xml, I should be rotating at 100Mb not 1Mb
and I should be rotating at least daily.

Problem 2
----------
The strangest part is that with every log rotation, the files names are
incremented with a +7 days. With multiple logs the same day my expectation
is that the file names look like:
main.info.log.2013-07-18.1
main.info.log.2013-07-18.2
main.info.log.2013-07-18.3
... or something of that nature.

Question 1
----------
Do we really want to rotate each log type file (err,info,warn)
independently as it appears to be doing? Or do we want to
rotate them as a group, i.e. if one needs rotating, we rotate
them all. In that way, you at least have an easier time finding
relevant data across all logs when troubleshooting.

btw... no memory problems caused this as was originally thought to be
the problem.

John Weigand

History

#1 Updated by John Weigand about 7 years ago

This could be related to Bug #4371 factory log rotation appears strange.

John Weigand

#2 Updated by Parag Mhashilkar about 7 years ago

  • Assignee set to Parag Mhashilkar

#3 Updated by Parag Mhashilkar about 7 years ago

  • Assignee changed from Parag Mhashilkar to Anthony Tiradani

#4 Updated by Anthony Tiradani about 7 years ago

  • Status changed from New to Feedback
  • Assignee changed from Anthony Tiradani to Parag Mhashilkar

#4371 should fix this issue as well. Ready for review and testing.

#5 Updated by John Weigand about 7 years ago

  • Status changed from Feedback to Assigned
  • Assignee changed from Parag Mhashilkar to Anthony Tiradani

See updates on factory and frontend testing for v3_1_rc4 in Bug #4371 dated today.

John Weigand

#6 Updated by John Weigand about 7 years ago

Restarted the factory and frontend fresh with latest changes in my area on cms-xen21 at 7/29 14:56.

frontend.xml

<process_logs>
  <process_log extension="info" max_days="1.0" max_mbytes="1.0" min_days="1.0" msg_types="INFO,ERR,WARN"/>
  <process_log extension="err" max_days="1.0" max_mbytes="1.0" min_days="1.0" msg_types="ERR,EXCEPTION"/>
  <process_log extension="warn" max_days="1.0" max_mbytes="1.0" min_days="1.0" msg_types="WARN"/>
</process_logs>

/opt/glideins/git-xen21-master-ps.ini/frontend/logs/frontend_frontend_service-master

[weigand@cms-xen21 frontend_frontend_service-master]$ ls -l *
frontend:
total 172
-rw-r--r-- 1 weigand weigand      0 Jul 29 14:57 frontend.err.log
-rw-r--r-- 1 weigand weigand 172032 Jul 30 08:51 frontend.info.log
-rw-r--r-- 1 weigand weigand      0 Jul 29 14:57 frontend.warn.log

group_main:
total 2720
-rw-r--r-- 1 weigand weigand    6889 Jul 30 06:37 main.err.log
-rw-r--r-- 1 weigand weigand  665383 Jul 30 08:51 main.info.log
-rw-r--r-- 1 weigand weigand 1048556 Jul 29 21:44 main.info.log.2013-07-29_21-44
-rw-r--r-- 1 weigand weigand 1048463 Jul 30 04:34 main.info.log.2013-07-30_04-34
-rw-r--r-- 1 weigand weigand       0 Jul 29 14:57 main.warn.log

The log rotation appears to be occurring correctly.
The timestamp (_HH-MM) on the rotated logs appears to be the last time and not the start time that we talked about.

John Weigand

#7 Updated by John Weigand about 7 years ago

Ran tests over night using latest changes to master_4371.
Looks good.
Logs are rolling fine.
Timestamps reflect HH-MM when log is rolled.

John Weigand

#8 Updated by John Weigand about 7 years ago

Completed test of changes for
commit: 8017f187c179d58a461539e50e85180a59f77ce3
at 8/1 10:00

Looks good
John Weigand

#9 Updated by Parag Mhashilkar about 7 years ago

  • Status changed from Assigned to Closed

Tony implemented several fixes to address the issues, John tested it. Changes are now merged into master. Closing the ticket



Also available in: Atom PDF