-
Notifications
You must be signed in to change notification settings - Fork 6
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
support for auth enabled Marathon #4
base: master
Are you sure you want to change the base?
Conversation
this.logger = logger; | ||
try { | ||
MarathonServiceDiscoveryHelper.start(marathonEndpoint, appId, port, logger); | ||
MarathonServiceDiscoveryHelper.start(marathonEndpoint, appId, port, marathonUsername, marathonPassword, | ||
logger); | ||
} catch (Exception e) { | ||
logger.severe("Failed to start service discovery!", e); |
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.
Is it ok to just log the exception? What is the client expectation?
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.
Service startup should not be impacted if marathon discovery fails so I guess that's why we are not rethrowing the Exception here.
this.logger = logger; | ||
try { | ||
MarathonServiceDiscoveryHelper.start(marathonEndpoint, appId, port, logger); | ||
MarathonServiceDiscoveryHelper.start(marathonEndpoint, appId, port, marathonUsername, marathonPassword, |
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.
Will this work if someone has upgraded the hazelcast marathon client but the marathon cluster isn't still not auth enabled?
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.
yes, if marathon username or password is null or empty we do not make auth based call inside the start method
HazelcastInstance hazelcast1 = getHazelcastInstance(5701); | ||
HazelcastInstance hazelcast2 = getHazelcastInstance(5702); | ||
HazelcastInstance hazelcast3 = getHazelcastInstance(5703); | ||
HazelcastInstance hazelcast1 = getHazelcastInstanceWithoutBasicAuth(5701); |
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.
Let's have test cases for both with and without auth
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.
yes, if you see here 87 and 88 line one's are Without Auth instances and 89th line one is With Auth. And in 91st line asserting that cluster members should be 3
No description provided.