[ 
https://issues.apache.org/jira/browse/AIRFLOW-5213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

venkata Bonu updated AIRFLOW-5213:
----------------------------------
    Attachment:     (was: Screen Shot 2019-08-14 at 7.09.27 AM.png)

> DockerOperator failing when the docker default logging drivers are other than 
> 'journald','json-file'
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-5213
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5213
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: DAG, operators
>    Affects Versions: 1.10.4
>            Reporter: venkata Bonu
>            Assignee: venkata Bonu
>            Priority: Major
>              Labels: easyfix
>         Attachments: Screen Shot 2019-08-14 at 7.08.44 AM.png, Screen Shot 
> 2019-08-14 at 7.10.01 AM.png
>
>
> Background:
> 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 , 
> journald
> Docker documentation: 
> [https://docs.docker.com/config/containers/logging/configure/]
>  
> Description:
> 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 error
> _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.
> ```
> {code:python}
> 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')
>     self.log.info(line)
> {code}
> ```
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to