You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Dennis O'Brien (JIRA)" <ji...@apache.org> on 2016/10/14 23:29:20 UTC
[jira] [Commented] (AIRFLOW-571) allow gunicorn config to be passed
to airflow webserver
[ https://issues.apache.org/jira/browse/AIRFLOW-571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15576867#comment-15576867 ]
Dennis O'Brien commented on AIRFLOW-571:
----------------------------------------
One possible implementation is to add this to airflow/www/gunicorn_config.py:
{code}
try:
from airflow_gunicorn_config import *
except ImportError:
pass
{code}
The client then could optionally provide `airflow_gunicorn_config.py` on the path and include any gunicorn config settings that are not handled either via the command line or in the airflow.cfg file. Here's an example gunicorn config: https://github.com/benoitc/gunicorn/blob/master/examples/example_config.py
> allow gunicorn config to be passed to airflow webserver
> -------------------------------------------------------
>
> Key: AIRFLOW-571
> URL: https://issues.apache.org/jira/browse/AIRFLOW-571
> Project: Apache Airflow
> Issue Type: Improvement
> Components: webserver
> Reporter: Dennis O'Brien
>
> I have run into an issue when running airflow webserver behind a load balancer where redirects result in https requests forwarded to http. I ran into a similar issue with Caravel which also uses gunicorn. https://github.com/airbnb/caravel/issues/978 From that issue:
> {quote}
> When gunicorn is run on a different machine from the load balancer (nginx or ELB), it needs to be told explicitly to trust the X-Forwarded-* headers sent. gunicorn takes an option --forwarded-allow-ips which can either be a comma separated list of ip addresses, or "*" to trust all.
> {quote}
> I don't see a simple way to inject custom arguments to the gunicorn call in `webserver()`. Rather than making a special case to set --forwarded-allow-ips, it would be nice if the caller of `airflow webserver` could pass an additional gunicorn config file.
> The call to gunicorn is already including a -c and I'm not sure gunicorn will take multiple configs, so maybe we have to parse the config and include each name=value on the gunicorn command line. Any suggestions on how best to allow this?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)