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/05/25 07:57:27 UTC
[GitHub] [airflow] Anirudhaagrawal opened a new issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Anirudhaagrawal opened a new issue #16039:
URL: https://github.com/apache/airflow/issues/16039
**Apache Airflow version**: latest. I am using the latest apache/airflow image from dockerhub.
**Kubernetes version**:
```
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2", GitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean", BuildDate:"2021-01-13T13:28:09Z", GoVersion:"go1.15.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.12", GitCommit:"e2a822d9f3c2fdb5c9bfbe64313cf9f657f0a725", GitTreeState:"clean", BuildDate:"2020-05-06T05:09:48Z", GoVersion:"go1.12.17", Compiler:"gc", Platform:"linux/amd64"}
```
**What happened**:
I added the following block of code to the user values in the helm chart and because of that, the pod failed to start because the liveliness probe failed.
```
ports:
airflowUI: 80
```
```
Normal Scheduled 3m19s default-scheduler Successfully assigned ucp/airflow-webserver-5c6dffbcd5-5crwg to ip-abcd.ap-south-1.compute.internal
Normal Pulled 3m18s kubelet Container image "xyz" already present on machine
Normal Created 3m18s kubelet Created container wait-for-airflow-migrations
Normal Started 3m18s kubelet Started container wait-for-airflow-migrations
Normal Pulled 3m6s kubelet Container image "xyz" already present on machine
Normal Created 3m6s kubelet Created container webserver
Normal Started 3m6s kubelet Started container webserver
Warning Unhealthy 2m8s (x9 over 2m48s) kubelet Readiness probe failed: Get http://100.124.0.6:80/health: dial tcp 100.124.0.6:80: connect: connection refused
Warning Unhealthy 2m4s (x10 over 2m49s) kubelet Liveness probe failed: Get http://100.124.0.6:80/health: dial tcp 100.124.0.6:80: connect: connection refused
```
**What you expected to happen**:
The liveliness probe should pass.
**How to reproduce it**:
Just change the default port for airflowUI from 8080 to 80.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] Anirudhaagrawal commented on issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
Anirudhaagrawal commented on issue #16039:
URL: https://github.com/apache/airflow/issues/16039#issuecomment-847729212
> https://github.com/apache/airflow/blob/master/chart/templates/webserver/webserver-service.yaml#L46
>
> ```diff
> protocol: TCP
> - port: {{ .Values.ports.airflowUI }}
> + port: 80
> + targetPort: {{ .Values.ports.airflowUI }}
> ```
>
> It should fix this bug. Can you check it?
Let me check
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] Junnplus commented on issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
Junnplus commented on issue #16039:
URL: https://github.com/apache/airflow/issues/16039#issuecomment-847912858
Hi @Anirudhaagrawal , I would like to know why change default port for airflowUI from 8080 to 80.
I found two problem:
1. Missing `.Values.config.webserver.web_server_port` when setting `.Values.ports.airflowUI` causes the health check to fail.
2. Gunicorn not starting when `.Values.ports.airflowUI` set to 80, because default user is airflow(non-privileged user).
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mik-laj commented on issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #16039:
URL: https://github.com/apache/airflow/issues/16039#issuecomment-847726062
It looks like a reaall bug. Are you willing to submit a PR with fix? We are probably changing the port in the container, but we should only do it in a service.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] Anirudhaagrawal commented on issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
Anirudhaagrawal commented on issue #16039:
URL: https://github.com/apache/airflow/issues/16039#issuecomment-847733298
``
> https://github.com/apache/airflow/blob/master/chart/templates/webserver/webserver-service.yaml#L46
>
> ```diff
> protocol: TCP
> - port: {{ .Values.ports.airflowUI }}
> + port: 80
> + targetPort: {{ .Values.ports.airflowUI }}
> ```
>
> It should fix this bug. Can you check it?
From my understanding, targetPort should be the default (8080) one. port: {{ .Values.ports.airflowUI }} seems correct. Correct me if I am wrong
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] Anirudhaagrawal commented on issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
Anirudhaagrawal commented on issue #16039:
URL: https://github.com/apache/airflow/issues/16039#issuecomment-848403844
> Hi @Anirudhaagrawal , I would like to know why change default port for airflowUI from 8080 to 80.
>
> I found two problem:
>
> 1. Missing `.Values.config.webserver.web_server_port` when setting `.Values.ports.airflowUI` causes the health check to fail.
> 2. Gunicorn not starting when `.Values.ports.airflowUI` set to 80, because default user is airflow(non-privileged user).
>
> In fact, users don’t care about the container port, we just need to change the health check port.
@Junnplus
I also do not care about the container I just wanted to expose the service on Kubernetes on 80 port as all our other services are exposed on 80 port on Kubernetes and we wrote some generic code on top of that assuming services are running on 80 port. From https://airflow.apache.org/docs/helm-chart/stable/parameters-ref.html#ports I assumed it does that.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #16039:
URL: https://github.com/apache/airflow/issues/16039#issuecomment-849396206
So just to clarify - I think `airflowUI` should be possible to set to anything, but then the Airflow container port could be simply hard-coded to `8080`. No need to have configuration for that.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk edited a comment on issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on issue #16039:
URL: https://github.com/apache/airflow/issues/16039#issuecomment-849391020
Agree. I think there is never a need to override the port. Kubernetes networking model make each POD has different IP address and you can have many pods listening on the same port even if they are running on the same machine in the cluster - and the way how you expose the port to outside world via ingress maps the external port to internal service/port number. I'd rather stick to non-configurable port for Airflow Chart.
Same with the health-check. Health-check is mostly for the internal kubernetes cluster management. You can still expose it to outside world on any port (And in our case, port of health-check of webserver is the same as the webserver one - so by exposing webserver your are also exposing the health-check).
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] Anirudhaagrawal commented on issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
Anirudhaagrawal commented on issue #16039:
URL: https://github.com/apache/airflow/issues/16039#issuecomment-847728593
> It looks like a reaall bug. Are you willing to submit a PR with fix? We are probably changing the port in the container, but we should only do it in a service.
I checked the container logs It is using 8080 in the container.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] Junnplus commented on issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
Junnplus commented on issue #16039:
URL: https://github.com/apache/airflow/issues/16039#issuecomment-849347296
@mik-laj Should we allow configuration of container ports? If so, we may need to add a new container port value, which I don't think is necessary.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk commented on issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #16039:
URL: https://github.com/apache/airflow/issues/16039#issuecomment-849391020
Agree. I think there is never a need to override the port. Kubernetes networking model make each POD has different IP address and you can have many pods listening on the same port even if they are running on the same machine in the cluster - and the way how you expose the port to outside world via ingress maps the external port to internal service/port number. I'd rather stick to non-configurable port for Airflow Chart.
Same with the health-check. Health-check is mostly for the internal kubernetes cluster management. You can still expose it to outside world on any port (And in our case, port of health-check of webserver is the same as the webserver one - so by exposing webserver your are alsoi exposing the health-check.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] kaxil closed issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
kaxil closed issue #16039:
URL: https://github.com/apache/airflow/issues/16039
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk edited a comment on issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on issue #16039:
URL: https://github.com/apache/airflow/issues/16039#issuecomment-849396206
So just to clarify - I think `airflowUI` should be possible to set to anything, but then the Airflow webserver container port could be simply hard-coded to `8080`. No need to have configuration for that.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] Anirudhaagrawal edited a comment on issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
Anirudhaagrawal edited a comment on issue #16039:
URL: https://github.com/apache/airflow/issues/16039#issuecomment-848403844
> Hi @Anirudhaagrawal , I would like to know why change default port for airflowUI from 8080 to 80.
>
> I found two problem:
>
> 1. Missing `.Values.config.webserver.web_server_port` when setting `.Values.ports.airflowUI` causes the health check to fail.
> 2. Gunicorn not starting when `.Values.ports.airflowUI` set to 80, because default user is airflow(non-privileged user).
>
> In fact, users don’t care about the container port, we just need to change the health check port.
@Junnplus
I also do not care about the container port I just wanted to expose the service over Kubernetes on 80 port as all our other services are exposed on 80 port over Kubernetes and we wrote some generic code on top of that assuming services are running on 80 port. From https://airflow.apache.org/docs/helm-chart/stable/parameters-ref.html#ports I assumed it does that.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mik-laj commented on issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #16039:
URL: https://github.com/apache/airflow/issues/16039#issuecomment-847727894
https://github.com/apache/airflow/blob/master/chart/templates/webserver/webserver-service.yaml#L46
````diff
protocol: TCP
- port: {{ .Values.ports.airflowUI }}
+ port: 80
+ targetPort: {{ .Values.ports.airflowUI }}
````
It should fix this bug. Can you check it?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] Junnplus commented on issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
Junnplus commented on issue #16039:
URL: https://github.com/apache/airflow/issues/16039#issuecomment-847904805
> https://github.com/apache/airflow/blob/master/chart/templates/webserver/webserver-service.yaml#L46
>
> ```diff
> protocol: TCP
> - port: {{ .Values.ports.airflowUI }}
> + port: 80
> + targetPort: {{ .Values.ports.airflowUI }}
> ```
>
> It should fix this bug. Can you check it?
It seem probe check has nothing to do with service port, it is the behavior of kubelet to check health of container.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] potiuk edited a comment on issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on issue #16039:
URL: https://github.com/apache/airflow/issues/16039#issuecomment-849396206
So just to clarify - I think `airflowUI` should be possible to set to anything, but then the Airflow webserver container port could be simply hard-coded to `8080`. No need to have configuration for container port.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] Junnplus edited a comment on issue #16039: Kubernetes liveliness probe fails when changing from default port for Airflow UI from 8080 to 80 in Helm Chart.
Posted by GitBox <gi...@apache.org>.
Junnplus edited a comment on issue #16039:
URL: https://github.com/apache/airflow/issues/16039#issuecomment-847912858
Hi @Anirudhaagrawal , I would like to know why change default port for airflowUI from 8080 to 80.
I found two problem:
1. Missing `.Values.config.webserver.web_server_port` when setting `.Values.ports.airflowUI` causes the health check to fail.
2. Gunicorn not starting when `.Values.ports.airflowUI` set to 80, because default user is airflow(non-privileged user).
In fact, users don’t care about the container port, we just need to change the health check port.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org