Use internal fluentd --log-rotate-size

We should be able to specify the log-rotate-size to
avoid situation where single logfile would take lots of disk
space. By default its 10MB logfile max.

Change-Id: I569f8682ee1306e5abb7cc140cec12e2d0903144
Closes-Bug: PROD-18249
diff --git a/fluentd/files/default-td-agent b/fluentd/files/default-td-agent
index 7343a45..e461981 100644
--- a/fluentd/files/default-td-agent
+++ b/fluentd/files/default-td-agent
@@ -1,2 +1,3 @@
 TD_AGENT_USER={{ fluentd_agent.get('user', 'root') }}
 TD_AGENT_GROUP={{ fluentd_agent.get('group', 'root') }}
+TD_AGENT_OPTIONS="--log-rotate-size {{ fluentd_agent.get('td_agent_log_rotate_size', '10000000') }}"
diff --git a/fluentd/files/override.conf b/fluentd/files/override.conf
index c5fa878..4ee2916 100644
--- a/fluentd/files/override.conf
+++ b/fluentd/files/override.conf
@@ -1,3 +1,6 @@
 [Service]
 User={{ fluentd_agent.get('user', 'root') }}
 Group={{ fluentd_agent.get('group', 'root') }}
+Environment='TD_AGENT_OPTIONS=--log-rotate-size {{ fluentd_agent.get('td_agent_log_rotate_size', '10000000') }}'
+ExecStart=
+ExecStart=/opt/td-agent/embedded/bin/fluentd --log /var/log/td-agent/td-agent.log --daemon /var/run/td-agent/td-agent.pid $TD_AGENT_OPTIONS
diff --git a/fluentd/map.jinja b/fluentd/map.jinja
index 9f72567..4b8ab10 100644
--- a/fluentd/map.jinja
+++ b/fluentd/map.jinja
@@ -2,6 +2,7 @@
   'Debian': {
     'user': 'root',
     'group': 'root',
+    'td_agent_log_rotate_size': '10000000',
     'pkgs': ['td-agent-additional-plugins', 'td-agent'],
     'gem_path': 'td-agent-gem',
     'service_name': 'td-agent',