Skip to content

Operator tests failing on IPV6 environment #36383

Closed
@Aboullos

Description

Before reporting an issue

  • I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

Area

operator

Describe the bug

Some operator tests are failing on the IPV6 environment

https://jenkins.com/view/OpenShift/job/rhbk-operator-test-pipeline/1108/

org.keycloak.operator.testsuite.integration.KeycloakNetworkPolicyTest.testJGroupsConnectivity org.keycloak.operator.testsuite.integration.KeycloakNetworkPolicyTest.testHttpAndHttps org.keycloak.operator.testsuite.integration.KeycloakNetworkPolicyTest.testServiceConnectivity org.keycloak.operator.testsuite.integration.KeycloakNetworkPolicyTest.testUpdate

Version

latest

Regression

  • The issue is a regression

Expected behavior

Pass

Actual behavior

6 failures

How to Reproduce?

Run a build of the job with the IPV6 parameters

Anything else?

No response

Activity

shawkins

shawkins commented on Jan 13, 2025

@shawkins
Contributor

The ClusteringTest failures seem to be reoccurrances of the lock issue - #34868. Added a comment there. The only thing new in the logs there related to ipv6 are repeated occurances of:

[2025-01-13T10:40:13.932Z] 2025-01-13 10:30:27,919 WARN  [org.jgroups.stack.Configurator] (ForkJoinPool.commonPool-worker-1) JGRP000026: unable to find an address other than loopback for IP version IPv4

As for the other tests, those seem to be issues with the NetworkPolicy and IPv6 - cc @pruivo @ahus1 @vmuzikar

pruivo

pruivo commented on Jan 13, 2025

@pruivo
Contributor

@Aboullos @shawkins do you know if JAVA_OPTS has -Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true set? JGroups will always prefer to use IPv4.

added a commit that references this issue on Jan 13, 2025
5e1fac6
ahus1

ahus1 commented on Jan 13, 2025

@ahus1
Contributor

I assume this should be added to the docs, probably here: #36393

But if this is something that the Operator tests needs to know, how would we pass on that information so the tests pass?

shawkins

shawkins commented on Jan 13, 2025

@shawkins
Contributor

@Aboullos @shawkins do you know if JAVA_OPTS has -Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true set? JGroups will always prefer to use IPv4.

It does not.

But if this is something that the Operator tests needs to know, how would we pass on that information so the tests pass?

Without additional changes I think we'll have to do this via the Keycloak CR unsupported template to add a JAVA_OPTS_APPEND env entry - there isn't a first class way to pass kc.sh env variables.

Alternatively I'd guess that the operator should be able to detect that it's running in a IPv6 environment and update things automatically.

vmuzikar

vmuzikar commented on Jan 13, 2025

@vmuzikar
Contributor

Alternatively I'd guess that the operator should be able to detect that it's running in a IPv6 environment and update things automatically.

+1 to this approach

ahus1

ahus1 commented on Jan 14, 2025

@ahus1
Contributor

@pruivo - I'm still surprised that JGroups don't pick the IPv6 if it doesn't find an IPv4 address. Preferring IPv4 is one thing, ignoring IPv6 another. Can this be changed to use IPv6 automatically if no IPv4 is available except for the loopback?

I marked the PR #36393 to now be related and no longer closing this PR as @shawkins was suggesting to automatically detect IPv6.

35 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Operator tests failing on IPV6 environment · Issue #36383 · keycloak/keycloak