Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mudit1403
Copy link

No description provided.

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);

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?

Copy link
Author

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,

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?

Copy link
Author

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);

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

Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants