mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
Add new error message to detect as non-cluster redis (#11719)
This commit is contained in:
parent
9a876ece1c
commit
043606895c
1 changed files with 7 additions and 1 deletions
|
|
@ -345,8 +345,14 @@ func isClusterDisabled(err error) bool {
|
|||
// On GCP Memorystore the CLUSTER command is entirely unavailable and fails with
|
||||
// this error. See
|
||||
// https://cloud.google.com/memorystore/docs/redis/product-constraints#blocked_redis_commands
|
||||
//
|
||||
// At some point it seems like the error message changed from wrapping the
|
||||
// command name with backticks to single quotes.
|
||||
func isClusterCommandUnknown(err error) bool {
|
||||
return strings.Contains(err.Error(), "ERR unknown command `CLUSTER`")
|
||||
return strings.Contains(err.Error(), "ERR unknown command `CLUSTER`") ||
|
||||
strings.Contains(err.Error(), "ERR unknown command 'CLUSTER'") ||
|
||||
strings.Contains(err.Error(), "ERR unknown command CLUSTER") ||
|
||||
strings.Contains(err.Error(), `ERR unknown command "CLUSTER"`)
|
||||
}
|
||||
|
||||
func ScanKeys(pool fleet.RedisPool, pattern string, count int) ([]string, error) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue