Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions playbooks/retire_host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@
# This catches the case where tracking.log is 0b
- name: Sync again
command: /edx/bin/send-logs-to-object-store -d "{{ COMMON_LOG_DIR }}/tracking/" -b "{{ COMMON_OBJECT_STORE_LOG_SYNC_BUCKET }}/logs/tracking"
- name: Sync edX services logs again
command: "/edx/bin/send-logs-to-object-store -d {{ COMMON_LOG_DIR }}{{ item.src }} -b {{ COMMON_OBJECT_STORE_LOG_SYNC_BUCKET }} -p {{ item.dest }}"
with_items:
- { src: '/lms/', dest: '{{ COMMON_OBJECT_STORE_EDX_LOG_SYNC_PREFIX | defaut("logs/edx/") }}lms/' }
- { src: '/cms/', dest: '{{ COMMON_OBJECT_STORE_EDX_LOG_SYNC_PREFIX | default("logs/edx/") }}cms/' }
when: (COMMON_OBJECT_STORE_EDX_LOG_SYNC is defined) and COMMON_OBJECT_STORE_EDX_LOG_SYNC is true

- name: Run minos verification
hosts: "{{TARGET}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@
postrotate
/usr/bin/killall -HUP rsyslogd
endscript
{% if COMMON_OBJECT_STORE_EDX_LOG_SYNC -%}
lastaction
{{ COMMON_OBJECT_STORE_LOG_SYNC_SCRIPT }} -d "{{ COMMON_LOG_DIR }}/lms" -b "{{ COMMON_OBJECT_STORE_LOG_SYNC_BUCKET }}" -p "{{ COMMON_OBJECT_STORE_EDX_LOG_SYNC_PREFIX }}lms/"
{{ COMMON_OBJECT_STORE_LOG_SYNC_SCRIPT }} -d "{{ COMMON_LOG_DIR }}/cms" -b "{{ COMMON_OBJECT_STORE_LOG_SYNC_BUCKET }}" -p "{{ COMMON_OBJECT_STORE_EDX_LOG_SYNC_PREFIX }}cms/"
endscript
{% endif -%}
}
3 changes: 3 additions & 0 deletions playbooks/roles/common_vars/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ COMMON_OBJECT_STORE_LOG_SYNC_PREFIX: "logs/tracking/"
COMMON_OBJECT_STORE_LOG_SYNC_SCRIPT: "{{ COMMON_BIN_DIR }}/send-logs-to-object-store"
COMMON_OBJECT_STORE_LOG_SYNC_ON_EXIT: "{{ COMMON_BIN_DIR }}/sync-logs-on-exit"

COMMON_OBJECT_STORE_EDX_LOG_SYNC_PREFIX : "logs/edx/"
COMMON_OBJECT_STORE_EDX_LOG_SYNC : false

COMMON_BASE_DIR: /edx
COMMON_DATA_DIR: "{{ COMMON_BASE_DIR}}/var"
COMMON_APP_DIR: "{{ COMMON_BASE_DIR}}/app"
Expand Down