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

Follow what documentation says we should do we're a perf standby and perfstandbyok=true #7241

Merged
merged 3 commits into from
Aug 5, 2019

Conversation

ncabatoff
Copy link
Collaborator

@ncabatoff ncabatoff commented Aug 1, 2019

i.e. return 200 instead of 429. Fixes #7240.

perfstandbyok=true, i.e. return 200 instead of 429.
@ncabatoff ncabatoff added this to the 1.2.1 milestone Aug 1, 2019
@@ -148,6 +148,8 @@ func getSysHealth(core *vault.Core, r *http.Request) (int, *HealthResponse, erro
code = drSecondaryCode
case !perfStandbyOK && perfStandby:
code = perfStandbyCode
case perfStandbyOK && perfStandby:
code = activeCode
Copy link
Member

Choose a reason for hiding this comment

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

This line is technically a noop. Can you combine these two case statements into just case perfStandby and then do an if in the case? I think that will be a little cleaner, then the case is just top-level on if it's a perf standby. In fact I'd suggest doing the same to the case below: have it just be case standby and an if for the standbyOK part.

jefferai
jefferai previously approved these changes Aug 5, 2019
@jefferai jefferai removed this from the 1.2.1 milestone Aug 5, 2019
if !perfStandbyOK {
code = perfStandbyCode
}
case standby:
Copy link
Contributor

Choose a reason for hiding this comment

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

Wondering if we want to still allow standbyOK to return 200 on performance standbys? It may be unexpected to stop returning 200 if perf standbys are turned on. What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You're talking about where a customer converts standbys to perf standbys or vice versa? I mean, I don't entirely understand why we have two different params (standbyOK and perfStandbyOK), but given that we do, if I were setting up monitoring of my vault instances and wanted this feature I'd simply provide both params.

Copy link
Member

Choose a reason for hiding this comment

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

@ncabatoff I talked to BK and we're in agreement on this change -- one thing I noticed is that the website docs have some errors around standbyok and perfstandbyok ("load balance" for instance) -- can you give those a once-through as well? After that I think merge this and cherry-pick it back.

@ncabatoff ncabatoff merged commit 233ca02 into master Aug 5, 2019
@ncabatoff ncabatoff deleted the fix-perfstandbyok-health branch August 5, 2019 20:47
ncabatoff added a commit that referenced this pull request Aug 5, 2019
…nd perfstandbyok=true (#7241)

Follow what documentation says we should do if we're a perf standby and perfstandbyok=true, i.e. return 200 instead of 429.
jefferai pushed a commit that referenced this pull request Aug 5, 2019
…nd perfstandbyok=true (#7241) (#7261)

Follow what documentation says we should do if we're a perf standby and perfstandbyok=true, i.e. return 200 instead of 429.
@chrishoffman chrishoffman added this to the 1.2.1 milestone Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix perfstandbyok logic
4 participants