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
merged 10 commits into from Mar 22, 2016
Merged

Even number across racks #906

merged 10 commits into from Mar 22, 2016

Conversation

@Calvinp
Copy link
Contributor

@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 }

This comment has been minimized.

@ssalinas

ssalinas Feb 19, 2016
Member

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
Calvinp and others added 6 commits Mar 14, 2016
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
Opt out of even number across racks.
@ssalinas
Copy link
Member

@ssalinas ssalinas commented Mar 22, 2016

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
Even number across racks
@ssalinas ssalinas merged commit d66f81c into master Mar 22, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@ssalinas ssalinas deleted the even_number_across_racks branch Mar 22, 2016
@ssalinas ssalinas removed hs_qa labels Mar 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.