- Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Version: v5.0.1
Platform: Ubuntu 22.04 / Python 3.10.12
Description:
sentinel_get_master_addr_by_name()
should return a (host, port) pair
This works for me...
root@ubuntu:~# redis-cli -h redis-sentinel-sentinel.redis.svc.cluster.local -p 26379 --no-auth-warning -c SENTINEL GET-MASTER-ADDR-BY-NAME myMaster 1) "192.168.74.178" 2) "6379"
This works for me...
root@ubuntu:~# cat sentinel.go package main import ( "github.com/redis/go-redis/v9" "context" "fmt" ) func main() { sentinel := redis.NewSentinelClient(&redis.Options{ Addr: "redis-sentinel-sentinel-headless.redis.svc.cluster.local:26379", Username: "default", Password: "asdf"}, ) ctx := context.TODO() fmt.Print( sentinel.GetMasterAddrByName(ctx, "myMaster").Result() ) } root@ubuntu:~# go run sentinel.go [192.168.94.104 6379]
This does NOT...
root@ubuntu:~# python3 Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import redis >>> sentinel = redis.sentinel.Sentinel([('redis-sentinel-sentinel-headless.redis.svc.cluster.local', 26379)], socket_timeout=0.5, password='asdf', sentinel_kwargs={'password': 'asdf'}) >>> sentinel.sentinel_get_master_addr_by_name('myMaster') True
vegassor
Metadata
Metadata
Assignees
Labels
No labels