venkata Bonu created AIRFLOW-5213:

             Summary: DockerOperator failing when the docker default logging 
drivers are other than 'journald','json-file'
                 Key: AIRFLOW-5213
             Project: Apache Airflow
          Issue Type: Bug
          Components: DAG, operators
    Affects Versions: 1.10.4
            Reporter: venkata Bonu
            Assignee: venkata Bonu
         Attachments: Screen Shot 2019-08-14 at 7.10.01 AM.png


Docker can be configured with multiple logging drivers.
 * syslog
 * local
 * json - file
 * journald
 * local
 * gelf
 * fluentd
 * awslogs
 * splunk
 * etwlogs
 * gcplogs
 * Logentries

But reading docker logs is supported only with drivers local , json-file , 

Docker documentation: 



When a docker is configured with a logging driver other than local , json-file 
, jourmald , Airflow Tasks which are using DockerOperator are failing with an 

_docker.errors.APIError: 501 Server Error: Not Implemented ("configured logging 
driver does not support reading")_

Issue exists in the below lines of the code when the operator is trying to read 
the logs by attaching the container.

line = ''
for line in self.cli.attach(container=self.container['Id'], stdout=True, 
stderr=True, stream=True):  
    line = line.strip()
    if hasattr(line, 'decode'):
       line = line.decode('utf-8')



This message was sent by Atlassian JIRA

Reply via email to