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

[FEAT] Add yaml argument to merlin stop-workers #98

Closed
shlanger opened this issue Jan 23, 2020 · 4 comments
Closed

[FEAT] Add yaml argument to merlin stop-workers #98

shlanger opened this issue Jan 23, 2020 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@shlanger
Copy link

🚀 Feature Request

What problem is this feature looking to solve?
Merlin runs sometimes fail and leave celery workers running. I want a convenient way to get rid of the workers from the ensemble that failed.

Describe the solution you'd like
I could use "merlin -f stop-workers", but I only want to get rid of workers associated with the queues from the ensemble that failed. I can supply the --queues argument, but that hard codes the queue name. I want something like "merlin -f stop-workers my_ensemble.yaml".

I organize my merlin runs in series with a sub-directory for each ensemble. There is a yaml file with the same name (but different parameters) in each directory. I can put the above command in a shell script and use it with any ensemble in the series (the yaml file knows how to compute the queue name).

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@shlanger shlanger added the enhancement New feature or request label Jan 23, 2020
@ben-bay ben-bay added the good first issue Good for newcomers label Jan 23, 2020
@koning koning changed the title [FEAT] [FEAT] Add yaml argument to merlin stop-workers Jan 23, 2020
@ben-bay
Copy link
Contributor

ben-bay commented Jan 23, 2020

This is a good idea (and not too tough to implement). I think instead of targeting the original spec my_ensemble.yaml, we'd build this to target the provenance spec my_ensemble_20191217-133515/merlin_info/my_ensemble.yaml (similar to merlin restart).

My only question is whether this would scan the spec for worker names, queue names, or both.

@shlanger
Copy link
Author

shlanger commented Jan 23, 2020 via email

@koning
Copy link
Member

koning commented Jan 23, 2020

@ben-bay If a user gives the yaml file then I would expect that the want to stop the workers listed in that spec. The queues would be associated to those workers. Maybe there could be an option to use the queues instead.

The user can give the workers a name though so the code will need to scan the worker_args before using the constructed name.
https://github.com/LLNL/merlin/blob/3d8780d8360f6f73f1534cb5287811e7412b53f8/merlin/study/celeryadapter.py#L257`

@ben-bay
Copy link
Contributor

ben-bay commented Feb 25, 2020

This was added in #118

@ben-bay ben-bay closed this as completed Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants