-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Conversation
perfstandbyok=true, i.e. return 200 instead of 429.
http/sys_health.go
Outdated
@@ -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 |
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.
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.
if !perfStandbyOK { | ||
code = perfStandbyCode | ||
} | ||
case standby: |
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.
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?
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.
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.
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.
@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.
…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.
i.e. return 200 instead of 429. Fixes #7240.