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/03/21 17:58:14 UTC
[GitHub] [airflow] kevincong opened a new issue #14926: Make the xcom sidecar container resource configurable
kevincong opened a new issue #14926:
URL: https://github.com/apache/airflow/issues/14926
<!--
Welcome to Apache Airflow! For a smooth issue process, try to answer the following questions.
Don't worry if they're not all applicable; just try to include what you can :-)
If you need to include code snippets or logs, please put them in fenced code
blocks. If they're super-long, please use the details tag like
<details><summary>super-long log</summary> lots of stuff </details>
Please delete these comment blocks before submitting the issue.
-->
<!--
IMPORTANT!!!
PLEASE CHECK "SIMILAR TO X EXISTING ISSUES" OPTION IF VISIBLE
NEXT TO "SUBMIT NEW ISSUE" BUTTON!!!
PLEASE CHECK IF THIS ISSUE HAS BEEN REPORTED PREVIOUSLY USING SEARCH!!!
Please complete the next sections or the issue will be closed.
These questions are the first thing we need to know to understand the context.
-->
**Apache Airflow version**: 2.0.1
**Kubernetes version (if you are using kubernetes)** (use `kubectl version`):1.11
**Environment**:
- **Cloud provider or hardware configuration**: OpenShift 3.11
- **OS** (e.g. from /etc/os-release): RHEL Server
- **Kernel** (e.g. `uname -a`): Linux
- **Install tools**: Airflow
- **Others**:
**What happened**:
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods \"sales-trend-predict.181186911d0344eda3f3ff7d446f7d62\" is forbidden: [maximum memory usage per Pod is 8Gi, but limit is 9663676416., minimum cpu usage per Container is 400m, but request is 1m., cpu max limit to request ratio per Container is 5, but provided ratio is 1000.000000.]","reason":"Forbidden","details":{"name":"sales-trend-predict.181186911d0344eda3f3ff7d446f7d62","kind":"pods"},"code":403}
**What you expected to happen**:
For some enterprise kubernetes/openshift cluster, the admin will set a cpu/memory limit on container's resource, eg. minimum 400m cpu core, maximum 8Gi memory etc. However, for airflow's auto generated sidecar container for xcom 'airflow-xcom-sidecar' will fail this requirement as the error shown above, since the cpu core request is set to '1m' currently, (https://github.com/apache/airflow/blob/master/airflow/kubernetes/pod_generator.py#L60), so the sidecar container won't be able to start up. Therefore, we need to have the capability to specify the xcom sidecar resource on kubernetesPodOperator as a parameter.
**How to reproduce it**:
<!---
As minimally and precisely as possible. Keep in mind we do not have access to your cluster or dags.
If you are using kubernetes, please attempt to recreate the issue using minikube or kind.
## Install minikube/kind
- Minikube https://minikube.sigs.k8s.io/docs/start/
- Kind https://kind.sigs.k8s.io/docs/user/quick-start/
If this is a UI bug, please provide a screenshot of the bug or a link to a youtube video of the bug in action
You can include images using the .md style of

To record a screencast, mac users can use QuickTime and then create an unlisted youtube video with the resulting .mov file.
--->
This error only exist in certain kubernetes cluster that have a restriction on container's resource. Therefore, the error can be reproduced by manually setting a resource restriction on admin's level (eg. cpu core request 400m minimum, etc.). Then use KubernetesPodOperator with xcom enabled, you will be able to reproduce the error above.
**Anything else we need to know**:
N/A
<!--
How often does this problem occur? Once? Every time etc?
Any relevant logs to include? Put them here in side a detail tag:
<details><summary>x.log</summary> lots of stuff </details>
-->
--
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] boring-cyborg[bot] commented on issue #14926: Make the xcom sidecar container resource configurable
Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #14926:
URL: https://github.com/apache/airflow/issues/14926#issuecomment-803632412
Thanks for opening your first issue here! Be sure to follow the issue template!
--
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 closed issue #14926: Make the xcom sidecar container resource configurable
Posted by GitBox <gi...@apache.org>.
mik-laj closed issue #14926:
URL: https://github.com/apache/airflow/issues/14926
--
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 #14926: Make the xcom sidecar container resource configurable
Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #14926:
URL: https://github.com/apache/airflow/issues/14926#issuecomment-803986642
Duplicate: https://github.com/apache/airflow/issues/10605
--
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