-
-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: m/s replication when using ipv6 #827
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #827 +/- ##
==========================================
+ Coverage 35.20% 35.75% +0.55%
==========================================
Files 19 19
Lines 3213 2629 -584
==========================================
- Hits 1131 940 -191
+ Misses 2015 1620 -395
- Partials 67 69 +2 ☔ View full report in Codecov by Sentry. |
Thanks for your contribution. I'm not quite sure when to add brackets or not. I noticed that getRedisServerIP in the AddRedisNodeToCluster function is not being replaced. By the way, does Redis Cluster still work fine on IPv6? @jmtsi |
@drivebyer Good catch! Somehow I missed those from my commit. All the remaining references have now been checked and replaced. I'll test the cluster-mode with IPv6 today and see that it works without problems. |
@drivebyer After these latest changes I can successfully create a cluster-mode Redis in my IPv6 cluster and the m/s replication works without problems. Edit: I noticed that commit authoring was wrong, so force pushed the branch with correct information. |
Signed-off-by: Jami Karvanen <[email protected]>
…function Signed-off-by: Jami Karvanen <[email protected]>
Signed-off-by: Jami Karvanen <[email protected]>
Signed-off-by: Jami Karvanen <[email protected]>
* Delete unnecessary brackets wrapping the IPv6 address Signed-off-by: Jami Karvanen <[email protected]> * Extract redis address formatting into separate getRedisServerAddress function Signed-off-by: Jami Karvanen <[email protected]> * Add tests for getRedisServerAddress Signed-off-by: Jami Karvanen <[email protected]> * Use getRedisServerAddress also in cluster-scaling.go Signed-off-by: Jami Karvanen <[email protected]> --------- Signed-off-by: Jami Karvanen <[email protected]> Signed-off-by: Matt Robinson <[email protected]>
Description
I couldn't get the master-follower replication working in my IPv6 EKS cluster. When the operator tried to set up the replication, the follower logged errors:
If I manually ran the
slaveof
command without using brackets, the replication started successfully:This PR modifies the
getRedisServerIP
function to return the plain IPv6 address, as the brackets should only be added when using<ipv6_addr>:<port>
pairs, as per RFC5952.I also add new function
getRedisServerAddress
, which handles the address formatting.Fixes #309, #139
Type of change
Checklist
Additional Context
This fixes the IPv6 support which was working previously only for the standalone instances.