mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joseph Wu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MESOS-7901) Logrotation not working
Date Fri, 18 Aug 2017 23:57:00 GMT

    [ https://issues.apache.org/jira/browse/MESOS-7901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16133796#comment-16133796
] 

Joseph Wu commented on MESOS-7901:
----------------------------------

You need to configure the logrotate module with some additional options.  Specifically:
{code}
"logrotate_stdout_options": "rotate 9"
"logrotate_stderr_options": "rotate 9"
{code}

This sets the default logrotation to 10 files of 10 MB each.  If you don't include any rotation
rules, using the {{logrotate}} binary is a noop.

> Logrotation not working 
> ------------------------
>
>                 Key: MESOS-7901
>                 URL: https://issues.apache.org/jira/browse/MESOS-7901
>             Project: Mesos
>          Issue Type: Bug
>          Components: agent
>    Affects Versions: 1.0.1
>            Reporter: BhardRahul
>              Labels: logrotate, mesos
>         Attachments: screenshot-1.png
>
>
> Hi,
> Here are our env details:
> *Mesos -* 1.0.1
> *System Logrotate -*  3.8.6-12.el7.x86_64
> Issue:
> We have configured logrotation following these documents:
> http://mesos.apache.org/documentation/latest/logging/
> http://continuousfailure.com/post/mesos27_logging/
> The configuration looks successful. We can see
>   - Mesos service started fine with logrotate module:
> {noformat}
> ]$ ps -ef | grep mesos-slave
> root      41061      1  1 09:10 ?        00:00:26 /usr/sbin/mesos-slave --containerizers=docker,mesos
--container_logger=org_apache_mesos_LogrotateContainerLogger --executor_registration_timeout=2mins
--hostname=xx.xxx.xx.xx --ip=xx.xx.xx.xx --modules=file:///etc/mesos-slave-logrotate.json
--work_dir=/xx/xxxxx-xxxxx --attributes=rack:xxxx;zone:xxxx --resources=ports:[10-65535]
> {noformat}
>   - Mesos-logrotate process for stdout & stderr files
> {noformat}
> ]$  ps -ef | grep mesos | grep logrotate
> root       8398      1  0 Aug17 ?        00:00:00 mesos-logrotate-logger --help=false
--log_filename=/xxx/xxxxxx/slaves/2dabe42d-afbd-4c5f-8bfc-d0233d366d02-S160/frameworks/cad4ec2a-4c09-45b2-8170-d0d62a2d06f5-0000/executors/xxx_xxx_xxx-xxxxx-v2.2c05d324-83c3-11e7-b256-06af9b31c5f7/runs/9a32d4cd-72f5-4494-93e3-14adf9d5620d/stdout
--logrotate_path=logrotate --max_size=10MB
> root       8399      1  0 Aug17 ?        00:00:00 mesos-logrotate-logger --help=false
--log_filename=/xxx/xxxxxxx/slaves/2dabe42d-afbd-4c5f-8bfc-d0233d366d02-S160/frameworks/cad4ec2a-4c09-45b2-8170-d0d62a2d06f5-0000/executors/xxx_xxx_xxx-xxxxxxxxx-v2.2c05d324-83c3-11e7-b256-06af9b31c5f7/runs/9a32d4cd-72f5-4494-93e3-14adf9d5620d/stderr
--logrotate_path=logrotate --max_size=10MB
> {noformat} 
> But logrotation is not happening when the size of 'stdout' crossed 10MB.Its size is 1.4GB
still no rotation.
> {noformat}
> ]$ du -sh /xxx/xxxx-xxxx/slaves/2dabe42d-afbd-4c5f-8bfc-d0233d366d02-S160/frameworks/cad4ec2a-4c09-45b2-8170-d0d62a2d06f5-0000/executors/xxx_xxx_xxx-xxxxx-v2.2c05d324-83c3-11e7-b256-06af9b31c5f7/runs/9a32d4cd-72f5-4494-93e3-14adf9d5620d/stdout
> 1.4G     /xxx/xxxx-xxxx/slaves/2dabe42d-afbd-4c5f-8bfc-d0233d366d02-S160/frameworks/cad4ec2a-4c09-45b2-8170-d0d62a2d06f5-0000/executors/xxx_xxx_xxx-xxxxx-v2.2c05d324-83c3-11e7-b256-06af9b31c5f7/runs/9a32d4cd-72f5-4494-93e3-14adf9d5620d/stdout
> {noformat}
> Please assist.
> Thanks
> Rahul



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message