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

K8SSAND-1787 ⁃ Cluster installation fails in ipv6 only kind environment #410

Closed
tom-code opened this issue Sep 19, 2022 · 0 comments · Fixed by #421
Closed

K8SSAND-1787 ⁃ Cluster installation fails in ipv6 only kind environment #410

tom-code opened this issue Sep 19, 2022 · 0 comments · Fixed by #421
Labels
bug Something isn't working

Comments

@tom-code
Copy link
Contributor

tom-code commented Sep 19, 2022

What happened?
Cassandra cluster installation on ipv6 only kind cluster is not successful.
(dc pod is up and ready, but CassandraDatacenter object is in status "Cassandra Operator Progress: Updating" forever)

Did you expect to see something different?
Cassandra working on ipv6 environment without problems.

How to reproduce it (as minimally and precisely as possible):
Install on ipv6 only environment (with vm_prefer_ipv4: false)

Environment
ipv6 only kind

  • Cass Operator version:
    v1.12.0

  • Kubernetes version information:
    Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.5", GitCommit:"c285e781331a3785a7f436042c65c5641ce8a9e9", GitTreeState:"clean", BuildDate:"2022-03-24T22:06:50Z", GoVersion:"go1.17.8", Compiler:"gc", Platform:"linux/amd64"}

  • Kubernetes cluster kind:
    ipv6 only kind

  • Manifests:

  • Cass Operator Logs:

Anything else we need to know?:
cass-operator compares ipv6 addresses in different formats (short format and full format(including 0:0:0)) which fails.
Pod has "short ipv6 ip" while NATIVE_ADDRESS_AND_PORT returned from cassandra has "full ipv6 ip".
Following patch solves my issue:

diff --git a/pkg/reconciliation/reconcile_racks.go b/pkg/reconciliation/reconcile_racks.go
index dad3e4d..f2df873 100644
--- a/pkg/reconciliation/reconcile_racks.go
+++ b/pkg/reconciliation/reconcile_racks.go
@@ -9,6 +9,7 @@ import (
        "sort"
        "strings"
        "time"
+       "net"
 
        appsv1 "k8s.io/api/apps/v1"
        corev1 "k8s.io/api/core/v1"
@@ -927,7 +928,8 @@ func (rc *ReconciliationContext) CreateUsers() result.ReconcileResult {
 
 func findHostIdForIpFromEndpointsData(endpointsData []httphelper.EndpointState, ip string) string {
        for _, data := range endpointsData {
-               if data.GetRpcAddress() == ip {
+               if net.ParseIP(data.GetRpcAddress()).Equal(net.ParseIP(ip)) {
                        return data.HostID
                }
        }

┆Issue is synchronized with this Jira Task by Unito
┆friendlyId: K8SSAND-1787
┆priority: Medium

@tom-code tom-code added the bug Something isn't working label Sep 19, 2022
@sync-by-unito sync-by-unito bot changed the title Installation fails in ipv6 only kind environment K8SSAND-1787 ⁃ Installation fails in ipv6 only kind environment Sep 19, 2022
@tom-code tom-code changed the title K8SSAND-1787 ⁃ Installation fails in ipv6 only kind environment K8SSAND-1787 ⁃ Cluster installation fails in ipv6 only kind environment Sep 19, 2022
@adejanovski adejanovski moved this to To Groom in K8ssandra Nov 8, 2022
Repository owner moved this from To Groom to Done in K8ssandra Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant