mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
Detect the NOPERM error to mean redis cluster is disabled (#5058)
This commit is contained in:
parent
a8d7b5478b
commit
5483adc26b
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 New Issue
Block a user