Skip to content

overlap pod should only be checked on running pods#10420

Closed
penfree wants to merge 3 commits intoapache:masterfrom
penfree:master
Closed

overlap pod should only be checked on running pods#10420
penfree wants to merge 3 commits intoapache:masterfrom
penfree:master

Conversation

@penfree
Copy link

@penfree penfree commented Aug 20, 2020

now, KubernetesPodOperator will check if there is an existing pod of this task, if the pod matches, it can be reused. But is does not filter completed or failed pods. when the task failed, it cannot be retried because there is already one failed pod with the label.

[2020-08-19 23:14:56,770] {{taskinstance.py:1150}} ERROR - Pod Launching failed: More than one pod running with labels: dag_id=IncrementDataBuild_wjwjyrmyy,execution_date=2020-08-19T164816.2350170000-ac196c6dc,task_id=exportdata-wjwjyrmyy
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/airflow/contrib/operators/kubernetes_pod_operator.py", line 276, in execute
    '{label_selector}'.format(label_selector=label_selector))
airflow.exceptions.AirflowException: More than one pod running with labels: dag_id=build,execution_date=2020-08-19T164816.2350170000-ac196c6dc,task_id=exportdata

@boring-cyborg boring-cyborg bot added the k8s label Aug 20, 2020
@boring-cyborg
Copy link

boring-cyborg bot commented Aug 20, 2020

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, pylint and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://apache-airflow-slack.herokuapp.com/

fix too long lines
fix trailing space
@kaxil
Copy link
Member

kaxil commented Aug 25, 2020

Can you rebase your PR on latest master please

@stale
Copy link

stale bot commented Oct 12, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Oct 12, 2020
@stale stale bot closed this Nov 15, 2020
@kaxil kaxil added provider:cncf-kubernetes Kubernetes (k8s) provider related issues and removed area:k8s labels Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

provider:cncf-kubernetes Kubernetes (k8s) provider related issues stale Stale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants