Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-7901

Logrotation not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.0.1
    • None
    • agent

    Description

      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:
        ]$ 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]
        
      • Mesos-logrotate process for stdout & stderr files
        ]$  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
        

      But logrotation is not happening when the size of 'stdout' crossed 10MB.Its size is 1.4GB still no rotation.

      ]$ 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
      

      Please assist.

      Thanks
      Rahul

      Attachments

        1. screenshot-1.png
          62 kB
          BhardRahul

        Activity

          People

            Unassigned Unassigned
            bhardrahul BhardRahul
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: