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

Make deploy_chronos_services shuffle #160

Merged
merged 2 commits into from
Jan 14, 2016

Conversation

nhandler
Copy link
Contributor

The shuf command shuffles lines, but list_chronos_jobs outputs 1
space-delimited line. This fixes #154

The shuf command shuffles lines, but list_chronos_jobs outputs 1
space-delimited line. This fixes #154
@nhandler nhandler self-assigned this Jan 14, 2016
@@ -1,4 +1,4 @@
#!/bin/bash
if am_i_mesos_leader >/dev/null; then
list_chronos_jobs | shuf | xargs -n 1 -r -P 5 setup_chronos_job
list_chronos_jobs | tr ' ' '\n' | shuf | xargs -n 1 -r -P 5 setup_chronos_job
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is... fine I think. What if list_chronos_jobs (and list_marathon_jobs) did one per line anyway?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about that, but I got worried that people might have scripts parsing that output (similar to how we do that with deploy_chronos_jobs) which would break after such a change. This approach seemed like the easiest and safest solution to the problem.

If we are fine possibly breaking some scripts, I can modify list_chronos_jobs.

@solarkennedy
Copy link
Contributor

ship

nhandler added a commit that referenced this pull request Jan 14, 2016
@nhandler nhandler merged commit bf34896 into master Jan 14, 2016
@nhandler nhandler deleted the deploy_chronos_services-shuffling branch January 14, 2016 23:56
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

Successfully merging this pull request may close these issues.

deploy_chronos_services isn't shuffling
2 participants