You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2018/12/19 19:19:43 UTC

[GitHub] stale[bot] closed pull request #3101: AIRFLOW-2179: Make parametrable the IP on which the worker log server binds to

stale[bot] closed pull request #3101: AIRFLOW-2179: Make parametrable the IP on which the worker log server binds to
URL: https://github.com/apache/incubator-airflow/pull/3101
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/bin/cli.py b/airflow/bin/cli.py
index 98b4321706..e3112ae1bc 100755
--- a/airflow/bin/cli.py
+++ b/airflow/bin/cli.py
@@ -859,10 +859,12 @@ def serve_logs(filename):  # noqa
             mimetype="application/json",
             as_attachment=False)
 
+    WORKER_LOG_SERVER_BIND_IP = \
+        conf.get('celery', 'WORKER_LOG_SERVER_BIND_IP')
     WORKER_LOG_SERVER_PORT = \
         int(conf.get('celery', 'WORKER_LOG_SERVER_PORT'))
     flask_app.run(
-        host='0.0.0.0', port=WORKER_LOG_SERVER_PORT)
+        host=WORKER_LOG_SERVER_BIND_IP, port=WORKER_LOG_SERVER_PORT)
 
 
 def worker(args):
diff --git a/airflow/config_templates/default_airflow.cfg b/airflow/config_templates/default_airflow.cfg
index 5356af79b6..048888da5b 100644
--- a/airflow/config_templates/default_airflow.cfg
+++ b/airflow/config_templates/default_airflow.cfg
@@ -298,8 +298,9 @@ worker_concurrency = 16
 # When you start an airflow worker, airflow starts a tiny web server
 # subprocess to serve the workers local log files to the airflow main
 # web server, who then builds pages and sends them to users. This defines
-# the port on which the logs are served. It needs to be unused, and open
+# the ip and the port on which the logs are served. It needs to be unused, and open
 # visible from the main web server to connect into the workers.
+worker_log_server_bind_ip = 0.0.0.0
 worker_log_server_port = 8793
 
 # The Celery broker URL. Celery supports RabbitMQ, Redis and experimentally
diff --git a/airflow/config_templates/default_test.cfg b/airflow/config_templates/default_test.cfg
index eaf3d03694..897a1fbdea 100644
--- a/airflow/config_templates/default_test.cfg
+++ b/airflow/config_templates/default_test.cfg
@@ -77,6 +77,7 @@ smtp_mail_from = airflow@example.com
 [celery]
 celery_app_name = airflow.executors.celery_executor
 worker_concurrency = 16
+worker_log_server_bind_ip = 0.0.0.0
 worker_log_server_port = 8793
 broker_url = sqla+mysql://airflow:airflow@localhost:3306/airflow
 result_backend = db+mysql://airflow:airflow@localhost:3306/airflow
diff --git a/scripts/ci/airflow_travis.cfg b/scripts/ci/airflow_travis.cfg
index 03d7e594a1..c5c4da1535 100644
--- a/scripts/ci/airflow_travis.cfg
+++ b/scripts/ci/airflow_travis.cfg
@@ -47,6 +47,7 @@ smtp_mail_from = airflow@example.com
 [celery]
 celery_app_name = airflow.executors.celery_executor
 worker_concurrency = 16
+worker_log_server_bind_ip = 0.0.0.0
 worker_log_server_port = 8793
 broker_url = amqp://guest:guest@localhost:5672/
 result_backend = db+mysql://root@localhost/airflow


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services