-
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
[HZ-820] Persist license key and support configuration update #20446
[HZ-820] Persist license key and support configuration update #20446
Conversation
hazelcast/src/main/java/com/hazelcast/internal/config/AbstractConfigLocator.java
Outdated
Show resolved
Hide resolved
...cast/src/main/java/com/hazelcast/internal/dynamicconfig/ClusterWideConfigurationService.java
Outdated
Show resolved
Hide resolved
...lcast/src/test/java/com/hazelcast/internal/config/dynamic/DynamicConfigXmlGeneratorTest.java
Outdated
Show resolved
Hide resolved
Now users can reload from default xml if they want to. Since we don't include default xml as file, this makes sense. This commit also changes how reload is looked. Now we only look at the configurationFile field of the Config object. This also makes sense because otherwise user cloud accidentally reload from a different file which he started the cluster. Also set configurationFile field where it didn't set previously.
# Conflicts: # hazelcast/src/main/java/com/hazelcast/instance/impl/DefaultNodeExtension.java
The job Click to expand the log file-------------------------- ---------SUMMARY---------- -------------------------- [ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.1.2:checkstyle (default) on project hazelcast: An error has occurred in Checkstyle report generation. Failed during checkstyle execution: There are 3 errors reported by Checkstyle 8.38 with /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder_2/checkstyle/checkstyle.xml ruleset. -> [Help 1] -------------------------- ---------ERRORS----------- -------------------------- [ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder_2/hazelcast/src/main/java/com/hazelcast/internal/config/LicenseKey.java:54:101: '8' is a magic number. [MagicNumber] -------------------------- [ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder_2/hazelcast/src/main/java/com/hazelcast/internal/config/LicenseKey.java:55:30: '+' should be on a new line. [OperatorWrap] -------------------------- [ERROR] /home/jenkins/jenkins_slave/workspace/Hazelcast-pr-builder_2/hazelcast/src/main/java/com/hazelcast/internal/config/LicenseKey.java:56:55: '+' should be on a new line. [OperatorWrap] -------------------------- |
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.
+1, a minor suggestion
@SuppressWarnings("checkstyle:MagicNumber") | ||
public String toString() { | ||
// last 8 characters are visible | ||
String maskedLicense = MASK_FOR_SENSITIVE_DATA + licenseKey.substring(licenseKey.length() - 8); |
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.
minor: reuse existing license masking code from
Lines 104 to 107 in 42219a5
String[] licenceKeyParts = e.getValue().split("#"); | |
String originalKeyPart = licenceKeyParts[licenceKeyParts.length - 1]; | |
return e.getKey() + "=" + originalKeyPart.substring(0, LICENSE_KEY_VISIBLE_CHAR_COUNT) + "*********" | |
+ originalKeyPart.substring(originalKeyPart.length() - LICENSE_KEY_VISIBLE_CHAR_COUNT); |
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.
License key changes now can be persisted. Also users can set their licenses via configuration update & reloading.
EE PR: https://github.com/hazelcast/hazelcast-enterprise/pull/4579
Checklist:
Team:
,Type:
,Source:
,Module:
) and Milestone setAdd to Release Notes
orNot Release Notes content
set