YARN-8297. Incorrect ATS Url used for Wire encrypted cluster.(addendum). Contributed by Sunil G.

(cherry picked from commit f61e3e752e)
This commit is contained in:
Rohith Sharma K S 2018-05-23 18:31:03 +05:30
parent 7d71b3a1cc
commit 8dcc7b853b
1 changed files with 7 additions and 5 deletions

View File

@ -31,7 +31,7 @@ function getYarnHttpProtocolScheme(rmhost, application) {
$.ajax({
type: 'GET',
dataType: 'json',
async: true,
async: false,
context: this,
url: httpUrl,
success: function(data) {
@ -44,7 +44,7 @@ function getYarnHttpProtocolScheme(rmhost, application) {
application.advanceReadiness();
}
});
return protocolScheme == "HTTPS_ONLY";
return protocolScheme;
}
function getTimeLineURL(rmhost, isHttpsSchemeEnabled) {
@ -97,7 +97,9 @@ function updateConfigs(application) {
Ember.Logger.log("RM Address: " + rmhost);
var isHttpsSchemeEnabled = getYarnHttpProtocolScheme(rmhost, application);
var protocolSchemeFromRM = getYarnHttpProtocolScheme(rmhost, application);
Ember.Logger.log("Is protocol scheme https? " + (protocolSchemeFromRM == "HTTPS_ONLY"));
var isHttpsSchemeEnabled = (protocolSchemeFromRM == "HTTPS_ONLY");
if(!ENV.hosts.timelineWebAddress) {
var timelinehost = "";
$.ajax({
@ -137,7 +139,7 @@ function updateConfigs(application) {
$.ajax({
type: 'GET',
dataType: 'json',
async: true,
async: false,
context: this,
url: getTimeLineV1URL(rmhost, isHttpsSchemeEnabled),
success: function(data) {
@ -171,7 +173,7 @@ function updateConfigs(application) {
$.ajax({
type: 'GET',
dataType: 'json',
async: true,
async: false,
context: this,
url: getSecurityURL(rmhost),
success: function(data) {