-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Explicit External IP check in Kubernetes Discovery Plugin [CN-296] #25324
Conversation
The job Click to expand the log file---------ERRORS----------- -------------------------- [ERROR] Failed to execute goal org.codehaus.mojo:license-maven-plugin:2.2.0:add-third-party (add-third-party) on project hazelcast-jet-s3: There are some forbidden licenses used, please check your dependencies. -> [Help 1] -------------------------- [ERROR] -------------------------- [ERROR] Re-run Maven using the -X switch to enable full debug logging. -------------------------- [ERROR] -------------------------- [ERROR] For more information about the errors and possible solutions, please read the following articles: -------------------------- [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException -------------------------- [ERROR] -------------------------- [ERROR] After correcting the problems, you can resume the build with the command -------------------------- [ERROR] mvn -rf :hazelcast-jet-s3 -------------------------- |
@@ -554,7 +584,7 @@ private static Integer extractNodePort(JsonObject serviceJson) { | |||
return ports.get(0).asObject().get("nodePort").asInt(); | |||
} | |||
|
|||
private String externalAddressForNode(String node) { | |||
private String externalIpAddressForNode(String node) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for this change? As I can see, the implementation hasn't changes, so we still return one IP address
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
address
is referring to the Address
class which is introduced in this PR.
ipAddress
is referring to the raw IP address in string type.
hazelcast/src/main/java/com/hazelcast/kubernetes/KubernetesClient.java
Outdated
Show resolved
Hide resolved
The job Click to expand the log file---------ERRORS----------- -------------------------- [ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-compiler/hazelcast/src/main/java/com/hazelcast/kubernetes/KubernetesClient.java:375: Line is longer than 130 characters (found 137). [LineLength] -------------------------- [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.3.0:checkstyle (default) on project hazelcast: An error has occurred in Checkstyle report generation. Failed during checkstyle execution: There is 1 error reported by Checkstyle 9.3 with /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-compiler/checkstyle/checkstyle.xml ruleset. -> [Help 1] -------------------------- [ERROR] -------------------------- [ERROR] Re-run Maven using the -X switch to enable full debug logging. -------------------------- [ERROR] -------------------------- [ERROR] For more information about the errors and possible solutions, please read the following articles: -------------------------- [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException -------------------------- [ERROR] -------------------------- [ERROR] After correcting the problems, you can resume the build with the command -------------------------- [ERROR] mvn -rf :hazelcast -------------------------- |
The job Click to expand the log file---------ERRORS----------- -------------------------- [ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder/hazelcast/src/main/java/com/hazelcast/kubernetes/KubernetesClient.java:375: Line is longer than 130 characters (found 137). [LineLength] -------------------------- [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.3.0:checkstyle (default) on project hazelcast: An error has occurred in Checkstyle report generation. Failed during checkstyle execution: There is 1 error reported by Checkstyle 9.3 with /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder/checkstyle/checkstyle.xml ruleset. -> [Help 1] -------------------------- [ERROR] -------------------------- [ERROR] Re-run Maven using the -X switch to enable full debug logging. -------------------------- [ERROR] -------------------------- [ERROR] For more information about the errors and possible solutions, please read the following articles: -------------------------- [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException -------------------------- [ERROR] -------------------------- [ERROR] After correcting the problems, you can resume the build with the command -------------------------- [ERROR] mvn -rf :hazelcast -------------------------- |
The job Click to expand the log file-------------------------- ---------SUMMARY---------- -------------------------- [ERROR] COMPILATION ERROR : -------------------------- [ERROR] /appdisk/jenkins/jenkins_slave/workspace/Hazelcast-pr-EE-compiler/hazelcast-enterprise/hazelcast-enterprise-native-memory/src/test/java/com/hazelcast/internal/memory/NoMixedJUnitAnnotationsInOurTestSourcesTest.java:[20,21] error: cannot find symbol -------------------------- ---------ERRORS----------- -------------------------- [ERROR] COMPILATION ERROR : -------------------------- [ERROR] /appdisk/jenkins/jenkins_slave/workspace/Hazelcast-pr-EE-compiler/hazelcast-enterprise/hazelcast-enterprise-native-memory/src/test/java/com/hazelcast/internal/memory/NoMixedJUnitAnnotationsInOurTestSourcesTest.java:[20,21] error: cannot find symbol -------------------------- [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:testCompile (default-testCompile) on project hazelcast-enterprise-native-memory: Compilation failure -------------------------- [ERROR] /appdisk/jenkins/jenkins_slave/workspace/Hazelcast-pr-EE-compiler/hazelcast-enterprise/hazelcast-enterprise-native-memory/src/test/java/com/hazelcast/internal/memory/NoMixedJUnitAnnotationsInOurTestSourcesTest.java:[20,21] error: cannot find symbol -------------------------- [ERROR] symbol: variable NO_JUNIT_MIXING -------------------------- [ERROR] location: class ArchUnitRules -------------------------- [ERROR] -> [Help 1] -------------------------- [ERROR] -------------------------- [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. -------------------------- [ERROR] Re-run Maven using the -X switch to enable full debug logging. -------------------------- [ERROR] -------------------------- [ERROR] For more information about the errors and possible solutions, please read the following articles: -------------------------- [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException -------------------------- [ERROR] -------------------------- [ERROR] After correcting the problems, you can resume the build with the command -------------------------- [ERROR] mvn -rf :hazelcast-enterprise-native-memory -------------------------- |
Internal PR hazelcast/hazelcast-mono#211 |
) Import of #25324 **Original PR description:** The problem is that it assumes the service has a type of LoadBalancer first. If it cannot find ExternalIP there, it jumps into catch block, assumes it has a NodePort kind, and determines ExternalIP according to it. The block needs to be improved in such way: It needs to check the kind of the service, and use a specific method to determine External IP. Checklist: - [x] Labels (`Team:`, `Type:`, `Source:`, `Module:`) and Milestone set - [x] Label `Add to Release Notes` or `Not Release Notes content` set - [x] Request reviewers if possible - [ ] Send backports/forwardports if fix needs to be applied to past/future releases Imported changes: - f63f7fa Explicit External IP check in Kubernetes Discovery Plugin... Closes #25324 Co-authored-by: semihbkgr <buyukgungorsemih@gmail.com> GitOrigin-RevId: 2bb2877cfb1f876e9263616b64307ae3a1a386f8
The problem is that it assumes the service has a type of LoadBalancer first. If it cannot find ExternalIP there, it jumps into catch block, assumes it has a NodePort kind, and determines ExternalIP according to it.
The block needs to be improved in such way:
It needs to check the kind of the service, and use a specific method to determine External IP.
Checklist:
Team:
,Type:
,Source:
,Module:
) and Milestone setAdd to Release Notes
orNot Release Notes content
set