Skip to content

Commit

Permalink
Clean up error message for raft lease request
Browse files Browse the repository at this point in the history
If we don't have a client yet and is expected to process a raft lease
command, we want the error (now warning) message to be less cryptic.

Dropped to a warning, as operators should be aware of the message, but
don't need to jump onto the error message itself. This should resolve
itself once a client has been connected.
  • Loading branch information
SimonRichardson committed Feb 24, 2022
1 parent 901ed81 commit bc46f1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/controller/raftlease/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ func (r *remote) SetAddress(addr string) {
// Request performs a request against a specific api.
func (r *remote) Request(ctx context.Context, command *raftlease.Command) error {
if r.client == nil {
r.config.Logger.Errorf("No attached client instance; dropping command: %v", command)
r.config.Logger.Warningf("not currently connected to the controller raft engine; dropping lease command: %v", command)
return lease.ErrDropped
}

Expand Down

0 comments on commit bc46f1e

Please sign in to comment.