Skip to content

Conversation

himanshug
Copy link
Contributor

Fixes ##5033

Incompatibilities:
This patch requires that coordinators/overlords are upgraded together that is no two coordinators or overlords should be running different versions of Druid code while upgrade.

@himanshug himanshug added this to the 0.11.0 milestone Nov 2, 2017
currentKnownLeader.set(leaderUrl);
return leaderUrl;
}
catch (MalformedURLException ex) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be log here what it found ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a log

return null;
}

String location = StringUtils.format("%s://%s%s", scheme, leader, requestURI);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we document somewhere that requests sent using "http" scheme would be redirected to "https" if both TLS/non-TLS ports are enabled?

This might be surprising to a user if the client being used can't handle HTTPS and fails because of the scheme change.

Ideally I think the redirect should follow the same scheme as the original request, but that doesn't seem straightforward to implement since the leaderID always prefers TLS if it's there. Any ideas on whether we could accomplish that in a simple way?

Copy link
Contributor Author

@himanshug himanshug Nov 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, ideally http should get redirected to http but that is not simple to implement. however fixing it, so that it atleast redirects to a valid url, is necessary. so the upgrade path is to enable clients so that they can handle both http and https... then upgrade druid and enable both http and https ports... then change client configs to refer to druid with https and then disable http port on druid servers.

I'll update the tls specific doc page.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the doc

@jon-wei
Copy link
Contributor

jon-wei commented Nov 7, 2017

👍

@pjain1 Did you have any more comments on this?

@jon-wei jon-wei merged commit 2ecebb3 into apache:master Nov 9, 2017
@jon-wei
Copy link
Contributor

jon-wei commented Nov 9, 2017

@himanshug Can you do the backport of this?

himanshug added a commit to himanshug/druid that referenced this pull request Nov 9, 2017
* Fix coordinator/overlord redirects when TLS is enabled

* address review comment

* fix UTs

* workaround to not ignore URL instance to fix the teamcity build

* update tls doc
@himanshug
Copy link
Contributor Author

@jon-wei thanks. #5068

@jon-wei
Copy link
Contributor

jon-wei commented Nov 9, 2017

@himanshug cool, I added a note to the 0.11.0 release notes in "Upgrading coordinators and overlords" regarding the incompatibilities, can you review that section?

@himanshug
Copy link
Contributor Author

@jon-wei changed slightly to make it clear that overlords and coordinators can be upgraded indepedent of each other. thanks.

gianm pushed a commit that referenced this pull request Nov 10, 2017
* Fix coordinator/overlord redirects when TLS is enabled

* address review comment

* fix UTs

* workaround to not ignore URL instance to fix the teamcity build

* update tls doc
leventov pushed a commit to metamx/druid that referenced this pull request Nov 13, 2017
…pache#5068)

* Fix coordinator/overlord redirects when TLS is enabled

* address review comment

* fix UTs

* workaround to not ignore URL instance to fix the teamcity build

* update tls doc
@himanshug himanshug deleted the fix_tls_redirect branch December 29, 2017 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants