mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
Detect the NOPERM error to mean redis cluster is disabled (#5058)
This commit is contained in:
parent
a8d7b5478b
commit
5483adc26b
2 changed files with 3 additions and 1 deletions
1
changes/issue-5048-detect-noperm-redis-standalone
Normal file
1
changes/issue-5048-detect-noperm-redis-standalone
Normal file
|
|
@ -0,0 +1 @@
|
|||
* Support Redis in standalone mode when CLUSTER commands are disabled via ACL.
|
||||
|
|
@ -336,7 +336,8 @@ func newCluster(conf PoolConfig) (*redisc.Cluster, error) {
|
|||
}
|
||||
|
||||
func isClusterDisabled(err error) bool {
|
||||
return strings.Contains(err.Error(), "ERR This instance has cluster support disabled")
|
||||
return strings.Contains(err.Error(), "ERR This instance has cluster support disabled") ||
|
||||
strings.Contains(err.Error(), "NOPERM this user has no permissions to run the 'cluster' command")
|
||||
}
|
||||
|
||||
// On GCP Memorystore the CLUSTER command is entirely unavailable and fails with
|
||||
|
|
|
|||
Loading…
Reference in a new issue