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 2021/12/30 12:45:04 UTC

[GitHub] [airflow] potiuk opened a new issue #20588: Health check path is not configured properly if AIRFLOW__WEBSERVER__BASE_URL is set via ENV variable

potiuk opened a new issue #20588:
URL: https://github.com/apache/airflow/issues/20588


   ### Discussed in https://github.com/apache/airflow/discussions/20587
   
   Seems that when `AIRFLOW__WEBSERVER__BASE_URL` is used the path for health check is not correctly set. 
   
   It is properly  configured if base ul is set via config though:
   
   ```
             livenessProbe:
               httpGet:
                 path: {{if .Values.config.webserver.base_url }}{{- with urlParse (tpl .Values.config.webserver.base_url .) }}{{ .path }}{{end}}{{end}}/health
                 port: {{ .Values.ports.airflowUI }}
   ```
   
   We should either warn the user when variable is used rather than config, or fix it so that also env var could be used.
   
   
   <div type='discussions-op-text'>
   
   <sup>Originally posted by **rdeteix** December 30, 2021</sup>
   ### Official Helm Chart version
   
   1.3.0 (latest released)
   
   ### Apache Airflow version
   
   2.2.3 (latest released)
   
   ### Kubernetes Version
   
   1.21
   
   ### Helm Chart configuration
   
   ```
   spec:
     values:
       env:
         - name: "AIRFLOW__WEBSERVER__BASE_URL"
           value: "http://localhost:8080/staging"
         - name: "AIRFLOW__WEBSERVER__ENABLE_PROXY_FIX"
           value: "True"
   ```
   
   ### Docker Image customisations
   
   _No response_
   
   ### What happened
   
   I tried to follow :
   
   https://airflow.apache.org/docs/apache-airflow/stable/howto/run-behind-proxy.html
   
   I've changed base_url and enable_proxy_fix environment variable and I got:
   
   ```
   [2021-12-30 07:36:54,583] {dagbag.py:500} INFO - Filling up the DagBag from /dev/null
   [2021-12-30 07:36:54,668] {manager.py:763} WARNING - No user yet created, use flask fab command to do it.
   [2021-12-30 07:36:55,176] {manager.py:512} WARNING - Refused to delete permission view, assoc with role exists DAG Runs.can_create User
   /home/airflow/.local/lib/python3.7/site-packages/airflow/www/utils.py:560 DeprecationWarning: 'jinja2.Markup' is deprecated and will be removed in Jinja 3.1. Import 'markupsafe.Markup' instead.
   [2021-12-30 07:37:02 +0000] [19] [INFO] Starting gunicorn 20.1.0
   [2021-12-30 07:37:02 +0000] [19] [INFO] Listening at: http://0.0.0.0:8080 (19)
   [2021-12-30 07:37:02 +0000] [19] [INFO] Using worker: sync
   [2021-12-30 07:37:02 +0000] [23] [INFO] Booting worker with pid: 23
   [2021-12-30 07:37:02 +0000] [24] [INFO] Booting worker with pid: 24
   [2021-12-30 07:37:02 +0000] [25] [INFO] Booting worker with pid: 25
   [2021-12-30 07:37:02 +0000] [26] [INFO] Booting worker with pid: 26
   [2021-12-30 07:37:12,944] {manager.py:512} WARNING - Refused to delete permission view, assoc with role exists DAG Runs.can_create User
   [2021-12-30 07:37:13,446] {manager.py:512} WARNING - Refused to delete permission view, assoc with role exists DAG Runs.can_create User
   [2021-12-30 07:37:13,510] {manager.py:512} WARNING - Refused to delete permission view, assoc with role exists DAG Runs.can_create User
   [2021-12-30 07:37:14,359] {manager.py:512} WARNING - Refused to delete permission view, assoc with role exists DAG Runs.can_create User
   20.0.113.28 - - [30/Dec/2021:07:37:22 +0000] "GET /health HTTP/1.1" b'404 Not Found' 38 "-" "kube-probe/1.21+"
   ```
   
   ### What you expected to happen
   
   _No response_
   
   ### How to reproduce
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)</div>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] blcksrx commented on issue #20588: Health check path is not configured properly if AIRFLOW__WEBSERVER__BASE_URL is set via ENV variable

Posted by GitBox <gi...@apache.org>.
blcksrx commented on issue #20588:
URL: https://github.com/apache/airflow/issues/20588#issuecomment-1010018654


   @kaxil it does not works, In addition there is a difference between that discussion and this one. problem here is that if you set `AIRFLOW__WEBSERVER__BASE_URL` env the `livenessProb` does not work and it will produce 404 error, while that discussion is more about if airflow deployed to a path like `/staging`, how its possible to correct the path of `livenessProb` from `/health` to `/staging/health`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] kaxil commented on issue #20588: Health check path is not configured properly if AIRFLOW__WEBSERVER__BASE_URL is set via ENV variable

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #20588:
URL: https://github.com/apache/airflow/issues/20588#issuecomment-1003169568


   There was similar discussion in https://github.com/apache/airflow/pull/9778#issuecomment-927357065


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk edited a comment on issue #20588: Health check path is not configured properly if AIRFLOW__WEBSERVER__BASE_URL is set via ENV variable

Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on issue #20588:
URL: https://github.com/apache/airflow/issues/20588#issuecomment-1010189157


   Did you try it ? Did it work for you @blcksrx ? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] blcksrx commented on issue #20588: Health check path is not configured properly if AIRFLOW__WEBSERVER__BASE_URL is set via ENV variable

Posted by GitBox <gi...@apache.org>.
blcksrx commented on issue #20588:
URL: https://github.com/apache/airflow/issues/20588#issuecomment-1011921462


   @potiuk that worked. thank a lot man


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #20588: Health check path is not configured properly if AIRFLOW__WEBSERVER__BASE_URL is set via ENV variable

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #20588:
URL: https://github.com/apache/airflow/issues/20588#issuecomment-1010188598


   @blcksrx - please read the description. Currently setting variable in Helm does not work. Use webserver config from values.yaml - it will work then.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #20588: Health check path is not configured properly if AIRFLOW__WEBSERVER__BASE_URL is set via ENV variable

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #20588:
URL: https://github.com/apache/airflow/issues/20588#issuecomment-1010189157


   Did you try it ? Did it work for you? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] blcksrx commented on issue #20588: Health check path is not configured properly if AIRFLOW__WEBSERVER__BASE_URL is set via ENV variable

Posted by GitBox <gi...@apache.org>.
blcksrx commented on issue #20588:
URL: https://github.com/apache/airflow/issues/20588#issuecomment-1010220251


   Thank you very much. I'll keep you posted.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org