Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] add async / poll params on Airflow | Initializing DB to fix hanging task #28

Closed
ataki opened this issue Dec 19, 2017 · 4 comments
Assignees

Comments

@ataki
Copy link

ataki commented Dec 19, 2017

First, thanks for making this project open source, it's saved me a bunch of time in getting airflow successfully deployed.

I thought I'd note this down since others may run into this issue.

My environment:

  • ansible version: 2.4.1
  • vagrant box: bento/ubuntu-16.04
  • I installed airflow-role using galaxy, with the default configurations
  • playbook:
---
- hosts: someserver
  roles:
    - idealista/airflow-role

I had an uninstalled import in one of my dags, which I expected to cause ansible to fail on the task "Airflow | Initializing DB", since it has to import the dags as part of this process. Instead, the exit signal is not received by ansible and the task hangs.

I discovered this by adding this to my task definition:

async: 60
poll: 60

I'm fairly new to ansible, and not suggesting that async is the best way to handle this, but the expected behavior on a bad import is that the ansible task should fail instead of hang.

jnogol pushed a commit that referenced this issue Dec 19, 2017
@jnogol jnogol self-assigned this Dec 19, 2017
@jnogol
Copy link
Collaborator

jnogol commented Dec 19, 2017

Hi @ataki!

Thank you for your nice words, we're happy to know that our role is helpful.

I've modified the task in a new branch, using command and environment and tried it and it seems to work. Please checkout to bugs/28 and tell us if it works for you too.

Regards,
Jose

@ataki
Copy link
Author

ataki commented Dec 19, 2017

Hey @jnogol,

Great! Can verify that running on the same setup I had before now works as expected - the task doesn't hang and the db is initialized.

@jnogol
Copy link
Collaborator

jnogol commented Dec 20, 2017

Cool, we're gonna merge this to develop and include it in our next release. Thanks for your feedback!

@jnogol jnogol closed this as completed Dec 20, 2017
@jnogol
Copy link
Collaborator

jnogol commented Dec 21, 2017

Hey @ataki,

We've just released v1.3.2 that fixes this problem.

Regards,
Jose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants