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

Even number across racks #906

merged 10 commits into from Mar 22, 2016

Even number across racks #906

merged 10 commits into from Mar 22, 2016


Copy link

@Calvinp Calvinp commented Feb 19, 2016

When scaling a rackSensitive request, it is best to scale to a number of instances that is a multiple of the number of racks to evenly spread load across each rack.

With this change, if scaling is selected but the target number of instances is not a multiple of the number of racks, a new dialog will pop up notifying the user of this fact. It has radio buttons to choose between the number they entered, the multiple one lower than the number they entered (but 0 is never suggested), and the multiple one higher than the one they entered.
So, if there are 3 racks and the user tries to scale to 5 instances, they will be prompted to choose between 3, 5 and 6 instances.
The radio button corresponding to the number the user entered is selected by default, so if the user fat fingers the ok button they will still get what they originally wanted.

return 0 unless @attributes.request.rackSensitive
if not @racks
@racks = new Racks []
@racks.fetch { async: false }
Copy link

Choose a reason for hiding this comment

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

We should be sure to catch errors here. If the call to fetch the number of racks fails for some reason, we should allow the user to continue without the extra prompt

@tpetr tpetr modified the milestone: 0.4.12 Feb 23, 2016
Calvin Pomerantz and others added 6 commits March 14, 2016 15:30
Adds a parameter to SingularityRequest to opt out of suggesting even numbers across racks, and the UI listens to this.
Also when creating or updating requests through the UI, there is a checkbox to toggle this
…veryone for this request forever, and made the checkbox for this in the edit form field remember current state
Copy link

This should be gtg now that we can optionally opt out of the messages, thanks @Calvinp

ssalinas added a commit that referenced this pull request Mar 22, 2016
@ssalinas ssalinas merged commit d66f81c into master Mar 22, 2016
@ssalinas ssalinas deleted the even_number_across_racks branch March 22, 2016 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants