-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Even number across racks #906
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… instances to scale to and give options
return 0 unless @attributes.request.rackSensitive | ||
if not @racks | ||
@racks = new Racks [] | ||
@racks.fetch { async: false } |
There was a problem hiding this comment.
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
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.
This should be gtg now that we can optionally opt out of the messages, thanks @Calvinp |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.