Skip to content
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

Dual-Stack / IPv6 K8S cluster causes operator to fail to connect to the Redis Pod(s) #279

Closed
galexrt opened this issue Jul 7, 2020 · 2 comments · Fixed by #369
Closed

Comments

@galexrt
Copy link

galexrt commented Jul 7, 2020

Expected behaviour

What do you want to achieve?

Run a Redis Cluster on a dual-stack Kubernetes cluster.

Actual behaviour

What is happening? Are all the pieces created? Can you access to the service?

The operator fails to communicate with the Pod(s) that have an IPv6 address.

time="2020-07-07T18:54:00Z" level=warning msg="error processing NAMESPACE/redis job (requeued): dial tcp: address fd00::36c:6379: too many colons in address" controller=redisfailover operator=redis-operator src="generic.go:224"

Steps to reproduce the behaviour

  1. Have a Kubernetes cluster using dual-stack, e.g., through Cilium.
  2. Creating a basic Redis cluster from the yaml examples

Environment

How are the pieces configured?

  • Redis Operator version: v1.0.0
  • Kubernetes version: v1.18.5
  • Kubernetes configuration used (eg: Is RBAC active?): RBAC enabled, dual-stack IPv4 + IPv6

Logs

time="2020-07-07T18:54:00Z" level=warning msg="error processing NAMESPACE/redis job (requeued): dial tcp: address fd00::36c:6379: too many colons in address" controller=redisfailover operator=redis-operator src="generic.go:224"

There are no additional lines about the issue when running in debug mode.


I don't have enough knowledge of the code to know where to use it, but utilizing the golang net package's JoinHostPort() func should do the trick for IPv4 and IPv6 Pods.

Example:

net.JoinHostPort(podIP, fmt.Sprintf("%d", port))

(https://godoc.org/net#JoinHostPort)

@github-actions
Copy link

This issue is stale because it has been open for 45 days with no activity.

@github-actions github-actions bot added the stale label Jan 14, 2022
@github-actions
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants