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
KNOX-2186 - Advanced service discovery configuration handling #238
Conversation
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.
So I think this one PR is trying to do too much. Especially around service dependencies.
I thought the idea of the Hadoop configuration XML was to avoid having to have another file to monitor. Why is there a need for auto-discovery-advanced-configuration.properties
? Wouldn't the XML file be updated anytime there is a change?
|
||
import java.util.Set; | ||
|
||
public enum SupportedService { |
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.
So I don't quite understand the purpose of this. I left a comment on the Jira about how dependencies between services isn't specific to CM. I don't know why certain services would be listed here. This seems brittle to have to keep up to date.
4574f04
to
29cd2d4
Compare
14adfba
to
f04f731
Compare
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.
LGTM
@@ -0,0 +1,36 @@ | |||
/* |
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.
There is AdvancedServiceDiscoveryConfig, then this is named AdvanceServiceDiscoveryConfigurationMessages.
Not a big deal at all, but they differ ("Advanced" vs "Advance").
What changes were proposed in this pull request?
Implemented CM specific advanced service discovery feature as described in KNOX-2186.
How was this patch tested?
Updated and ran JUnit tests:
Additionally, I tested new features manually. I've used the following two files:
/Users/smolnar/test/knoxGateway/conf/descriptors/testDescriptor.cm
/Users/smolnar/test/knoxGateway/conf/auto-discovery-advanced-configuration.properties
During my test rounds, I modified the content of both files, combining them to cover all possible use-cases (e.g. enforcing required services, disabled enforcement, disabled/enabled services, used custom services, etc...). In all cases, I confirmed that CM specific monitors triggered the necessary actions and the expected descriptors were generated.