Skip to content
This repository was archived by the owner on Apr 20, 2021. It is now read-only.

Write logs to stdout #8

Closed
wants to merge 10 commits into from
Closed

Write logs to stdout #8

wants to merge 10 commits into from

Conversation

dleard
Copy link
Contributor

@dleard dleard commented Mar 31, 2020

  • Turn on remote-logging
  • Set values for elasticsearch
  • pip install elasticsearch
  • update postgres to use netapp-file instead of netapp-block (block kerplodes on openshift)

Docs: (under 'writing logs to elasticsearch')
https://github.com/apache/airflow/blob/1e3cdddcd87be3c0f11b43efea11cdbddaff4470/docs/howto/write-logs.rst

@dleard
Copy link
Contributor Author

dleard commented Mar 31, 2020

closes #7

Copy link
Collaborator

@wenzowski wenzowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the one thing that I think is out of scope on this PR (may be necessary but I hope not). Happy to look into this tomorrow. Otherwise, looks great!

@@ -64,7 +64,7 @@ persistence:
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
storageClass: netapp-block-standard
storageClass: netapp-file-standard
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only thing I want to get to the bottom of. I can take a poke at getting netapp-block-standard working again tomorrow.

Copy link
Collaborator

@wenzowski wenzowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to commit on your branch for a bit to try and resolve the netapp issue. Will comment here when handing back @dleard

AIRFLOW__ELASTICSEARCH__HOST: 'airflow'
AIRFLOW__ELASTICSEARCH__LOG_ID_TEMPLATE: '{{dag_id}}-{{task_id}}-{{execution_date}}-{{try_number}}'
AIRFLOW__ELASTICSEARCH__END_OF_LOG_MARK: 'end_of_log'
AIRFLOW__ELASTICSEARCH__WRITE_STDOUT: 'true'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

C_FORCE_ROOT should be moved out of extraEnv too, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wenzowski I don't think so? It sounds to me like C_FORCE_ROOT needs to be an env variable in order to run celery as root, whereas variables like AIRFLOW_ELASTICSEARCH_HOST are being inserted into the ariflow.cfg, which is why they are under airflow:config:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wenzowski
Copy link
Collaborator

Done mucking; though now wondering if this is the right approach. By writing logs to a fake elasticsearch we can't read them back. Maybe we should be writing them to an object storage bucket instead?

@wenzowski
Copy link
Collaborator

A look at the persistent volume claim annotations revealed that volume provisioning was stuck. Deleting the claim and re-provisioning solved the issue.

oc -n wksv3k-tools get pvc cas-airflow-postgresql -o json | jq '.metadata.annotations'

@dleard dleard closed this Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants