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

[BUG] feature example leaves messages in queue #129

Closed
lucpeterson opened this issue Feb 13, 2020 · 5 comments
Closed

[BUG] feature example leaves messages in queue #129

lucpeterson opened this issue Feb 13, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@lucpeterson
Copy link
Member

🐛 Bug Report

Describe the bug
The feature example, which shows how to stop workers from within a worker leaves the stop worker command in the queue, since the worker kills itself and doesn't acknowledge that it finished. This can cause other workers later to pick this back up and kill themselves and others later on.

To Reproduce
Steps to reproduce the behavior:

  1. merlin run feature_demo.yaml
  2. merlin run-workers feature_demo.yaml
  3. merlin status feature_demo.yaml

--> you'll see there's still a task in the queue

Expected behavior
The queue should be empty after the workflow finishes.

Additional context
I think the fix is to add a delay to the stop workers command in the step and background it, something like

( sleep 30; merlin stop-workers ) &

instead of just merlin stop-workers

this should fork a child background process that will execute after the parent worker finishes the step (and removes it from the server). I'm not sure what the sleep delay should be.

@lucpeterson lucpeterson added the bug Something isn't working label Feb 13, 2020
@ben-bay
Copy link
Contributor

ben-bay commented Feb 13, 2020

Uh oh that's bad. Good catch

@ben-bay
Copy link
Contributor

ben-bay commented Feb 26, 2020

One possibly mitigating factor is that the current code reads:

merlin stop-workers --workers '.*$(WORKER_NAME)*'

...so it's limited to one particular worker name.

@ben-bay
Copy link
Contributor

ben-bay commented Feb 26, 2020

@lucpeterson I just tested your suggested solution, but it didn't work. The demo_worker remains

@ben-bay
Copy link
Contributor

ben-bay commented Mar 6, 2020

This step has been removed for the time being.

@ben-bay ben-bay closed this as completed Mar 6, 2020
@lucpeterson
Copy link
Member Author

#182 should address this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants