Giter Site home page Giter Site logo

KeyDB data won't replicate about charts HOT 12 CLOSED

enapter avatar enapter commented on August 24, 2024
KeyDB data won't replicate

from charts.

Comments (12)

Antiarchitect avatar Antiarchitect commented on August 24, 2024
keydb-managed-0:/data# redis-cli
Message of the day:
  We want to hear from you! Help make KeyDB better with a quick 5 question survey: https://www.surveymonkey.com/r/Y9XNS93

127.0.0.1:6379> get foo
(nil)
127.0.0.1:6379> set foo bar
OK
127.0.0.1:6379>
keydb-managed-1:/data# redis-cli
Message of the day:
  We want to hear from you! Help make KeyDB better with a quick 5 question survey: https://www.surveymonkey.com/r/Y9XNS93

127.0.0.1:6379> get foo
"bar"
127.0.0.1:6379> set foo baz
OK
127.0.0.1:6379>
keydb-managed-0:/data# redis-cli
Message of the day:
  We want to hear from you! Help make KeyDB better with a quick 5 question survey: https://www.surveymonkey.com/r/Y9XNS93

127.0.0.1:6379> get foo
"baz"
127.0.0.1:6379>

Cannot reproduce. Can you provide me more logs? And please check that one node can reach another via 6379 port.

And plese provide the Replication section of info:
127.0.0.1:6379> info

from charts.

rhzs avatar rhzs commented on August 24, 2024

@Antiarchitect

In GKE, DNS won't resolve the pod address at keydb-1.keydb.default.svc.cluster.local. It can only resolve the service keydb.default.svc.cluster.local.

I tried to add and use kube headless service at keydb-1.keydb.keydb-headless.default or keydb-1.keydb-headless.default but it won't work either.
Screen Shot 2020-03-16 at 04 27 21

Screen Shot 2020-03-16 at 04 26 27

Screen Shot 2020-03-16 at 04 33 57

It can only connect, if I use Pod IP directly.

Screen Shot 2020-03-16 at 04 30 24

Any thoughts?

from charts.

Antiarchitect avatar Antiarchitect commented on August 24, 2024

According to these official docs: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#stable-network-id all should work if cluster DNS is cluster.local. StatefulSet's field .spec.serviceName is headless service name. I will try to check the situation on GKE in some time and let you know.

from charts.

rhzs avatar rhzs commented on August 24, 2024

My GKE version is 1.14.10-gke.17. I have also tried to debug with nslookup. I hope it will be useful.

Screen Shot 2020-03-16 at 04 50 23

from charts.

Antiarchitect avatar Antiarchitect commented on August 24, 2024

It's actually strange, because the pod identifies self correctly:

root@keydb-0:/data# ping keydb-0
PING keydb-0.keydb.default.svc.cluster.local (10.12.1.3) 56(84) bytes of data.
64 bytes from keydb-0.keydb.default.svc.cluster.local (10.12.1.3): icmp_seq=1 ttl=64 time=0.016 ms
64 bytes from keydb-0.keydb.default.svc.cluster.local (10.12.1.3): icmp_seq=2 ttl=64 time=0.031 ms
64 bytes from keydb-0.keydb.default.svc.cluster.local (10.12.1.3): icmp_seq=3 ttl=64 time=0.033 ms
64 bytes from keydb-0.keydb.default.svc.cluster.local (10.12.1.3): icmp_seq=4 ttl=64 time=0.033 ms
64 bytes from keydb-0.keydb.default.svc.cluster.local (10.12.1.3): icmp_seq=5 ttl=64 time=0.033 ms

from charts.

rhzs avatar rhzs commented on August 24, 2024

I have no idea, it works on me too keydb-0.keydb.default.svc.cluster.local

Screen Shot 2020-03-16 at 05 35 33

from charts.

Antiarchitect avatar Antiarchitect commented on August 24, 2024

It is because there is no actual dns resolution. This name is hardcoded into /etc/hosts

from charts.

rhzs avatar rhzs commented on August 24, 2024

Ok, what's the permanent solution?

Screen Shot 2020-03-16 at 05 40 02

from charts.

Antiarchitect avatar Antiarchitect commented on August 24, 2024

I've found the problem. My service wasn't headless. Please try 0.6.0 (you should delete the previous service as clusterIP field is immutable). Thank you for your bug report it was very helpful. I don't know how it worked before in my environment.

from charts.

rhzs avatar rhzs commented on August 24, 2024

@Antiarchitect I can confirm, it works. Perhaps you may need to update your docs as well, add how to connect to keydb using this chart and how to upgrade this chart.

Screen Shot 2020-03-16 at 07 30 43

Thank you!

from charts.

rhzs avatar rhzs commented on August 24, 2024

@Antiarchitect I have one PR to improve routing strategy using headless service
See https://github.com/Enapter/charts/pull/3/files

from charts.

Antiarchitect avatar Antiarchitect commented on August 24, 2024

I believe you can avoid namespace as well. Pods from one namespace should be resolved properly. I will investigate if this is a good idea in general but now it looks good to me (because we can avoid cluster DNS suffix). Thank you!

from charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.