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

Bounce deny #766

Merged
merged 5 commits into from Dec 4, 2015

Conversation

Projects
None yet
3 participants
@ssalinas
Member

ssalinas commented Nov 18, 2015

For OPTIMISTIC and GREEDY it shouldn't matter. But, if placement is SEPARATE*, don't allow us to start a bounce we know we can't complete

Show outdated Hide outdated ...ice/src/main/java/com/hubspot/singularity/resources/RequestResource.java
if (placement != SlavePlacement.GREEDY && placement != SlavePlacement.OPTIMISTIC) {
int currentActiveSlaveCount = slaveManager.getNumObjectsAtState(MachineState.ACTIVE);
int requiredSlaveCount = requestWithState.getRequest().getInstancesSafe() * 2;
checkBadRequest(currentActiveSlaveCount >= requiredSlaveCount, "Not enough slaves to successfully complete a bounce of reqeust %s (minimum required: %s, current: %s)", requestId, requiredSlaveCount, currentActiveSlaveCount);

This comment has been minimized.

@tpetr

tpetr Nov 18, 2015

Member

can you clarify this to Not enough active slaves... and maybe include guidance to consider deploying instead of bouncing or changing the slave placement?

@tpetr

tpetr Nov 18, 2015

Member

can you clarify this to Not enough active slaves... and maybe include guidance to consider deploying instead of bouncing or changing the slave placement?

Show outdated Hide outdated ...ice/src/main/java/com/hubspot/singularity/resources/RequestResource.java
if (placement != SlavePlacement.GREEDY && placement != SlavePlacement.OPTIMISTIC) {
int currentActiveSlaveCount = slaveManager.getNumObjectsAtState(MachineState.ACTIVE);
int requiredSlaveCount = requestWithState.getRequest().getInstancesSafe() * 2;
checkBadRequest(currentActiveSlaveCount >= requiredSlaveCount, "Not enough active slaves to successfully complete a bounce of reqeust %s (minimum required: %s, current: %s). Consider deploying or changing the slave placement strategy instead", requestId, requiredSlaveCount, currentActiveSlaveCount);

This comment has been minimized.

This comment has been minimized.

@ssalinas

ssalinas Nov 18, 2015

Member

whoops, thanks

@ssalinas

ssalinas Nov 18, 2015

Member

whoops, thanks

ssalinas added some commits Nov 18, 2015

@tpetr tpetr added the hs_stable label Dec 3, 2015

@tpetr tpetr added this to the 0.4.6 milestone Dec 4, 2015

@tpetr tpetr merged commit 6f43bc3 into master Dec 4, 2015

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

@tpetr tpetr deleted the bounce_deny branch Dec 4, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment