Commit 8e2f37f6 by e0d

Merge pull request #1525 from edx/e0d/minos-fixes

Use bucket var, force a sync
parents 5379c181 d2d7f65b
......@@ -19,25 +19,24 @@
sudo: True
gather_facts: False
tasks:
- name: Terminate existing s3 log sync
command: /usr/bin/pkill send-logs-to-s3 || true
- name: "Send tracking logs to s3 if it is not handled by logrotate"
shell: grep -q send-logs-to-s3 /etc/logrotate.d/hourly/tracking.log || /edx/app/aws/send-logs-to-s3 -d "/edx/var/log/tracking/*" -b "edx-stage-edx/logs/tracking"
- name: "Ensure send-logs-to-s3 script is in the logrotate file"
shell: grep send-logs-to-s3 /etc/logrotate.d/hourly/tracking.log
# We only force a rotation of edx logs.
# Forced rotation of system logfiles will only
# work if there hasn't already been a previous rotation
# The logrotate will also call send-logs-to-s3 but hasn't
# been updated for all servers yet.
- name: Force a log rotation which will call the log sync
command: /usr/sbin/logrotate -f /etc/logrotate.d/hourly/{{ item }}
with_items:
- "tracking.log"
- "edx-services"
# This catches the case where tracking.log is 0b
- name: Sync again
command: /edx/bin/send-logs-to-s3 -d "{{ COMMON_LOG_DIR }}/tracking/*" -b "{{ COMMON_AWS_SYNC_BUCKET }}/logs/tracking"
- name: Run minos verification
hosts: Terminating_Wait
sudo: True
......
......@@ -2,5 +2,5 @@ TrackingLogVoter:
config:
aws_profile: !!null
local_directory: '{{ COMMON_LOG_DIR }}/tracking'
s3_bucket: 'edx-{{ COMMON_ENVIRONMENT }}-{{ COMMON_DEPLOYMENT }}'
s3_bucket: '{{ COMMON_AWS_SYNC_BUCKET }}'
bucket_path_prefix: 'logs/tracking'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment