Author: yusaku
Date: Thu Jan 31 00:28:30 2013
New Revision: 1440750
URL: http://svn.apache.org/viewvc?rev=1440750&view=rev
Log:
AMBARI-1315. Inconsistent error/warning status in Deploy step; install stalls.
(Arun Kandregula via yusaku)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step1_controller.js
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step9_controller.js
incubator/ambari/trunk/ambari-web/app/routes/installer.js
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1440750&r1=1440749&r2=1440750&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Jan 31 00:28:30 2013
@@ -199,6 +199,9 @@ Trunk (unreleased changes):
BUG FIXES
+ AMBARI-1315. Inconsistent error/warning status in Deploy step; install
+ stalls. (Arun Kandregula via yusaku)
+
AMBARI-1281. Heatmap does not show up if the cluster was installed by going
back to a previous step from the Deploy step after an install failure.
(yusaku)
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step1_controller.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step1_controller.js?rev=1440750&r1=1440749&r2=1440750&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step1_controller.js
(original)
+++
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step1_controller.js
Thu Jan 31 00:28:30 2013
@@ -26,7 +26,10 @@ App.WizardStep1Controller = Em.Controlle
loadStep: function () {
this.set('hasSubmitted',false);
},
-
+ /**
+ * validate cluster name
+ * set clusterNameError if validation fails
+ */
invalidClusterName : function(){
if(!this.get('hasSubmitted')){
this.set('clusterNameError', '');
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js?rev=1440750&r1=1440749&r2=1440750&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js
(original)
+++
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step2_controller.js
Thu Jan 31 00:28:30 2013
@@ -48,7 +48,9 @@ App.WizardStep2Controller = Em.Controlle
// return validator.isHostname(hostname) && (!(/^\-/.test(hostname) ||
/\-$/.test(hostname)));
return true;
},
-
+ /**
+ * set not installed hosts to the hostNameArr
+ */
updateHostNameArr: function(){
this.hostNameArr = this.get('hostNames').trim().split(new RegExp("\\s+",
"g"));
this.patternExpression();
@@ -61,7 +63,10 @@ App.WizardStep2Controller = Em.Controlle
}
this.set('hostNameArr', tempArr);
},
-
+ /**
+ * validate host names
+ * @return {Boolean}
+ */
isAllHostNamesValid: function () {
var self = this;
var result = true;
@@ -77,7 +82,9 @@ App.WizardStep2Controller = Em.Controlle
},
hostsError: null,
-
+ /**
+ * set hostsError if host names don't pass validation
+ */
checkHostError: function () {
if (this.get('hostNames').trim() === '') {
this.set('hostsError',
Em.I18n.t('installer.step2.hostName.error.required'));
@@ -169,7 +176,10 @@ App.WizardStep2Controller = Em.Controlle
this.proceedNext();
},
-
+ /**
+ * check is there a pattern expression in host name textarea
+ * push hosts that match pattern in hostNamesArr
+ */
patternExpression: function(){
this.isPattern = false;
var self = this;
@@ -178,7 +188,7 @@ App.WizardStep2Controller = Em.Controlle
var start, end, extra = {0:""};
if(/\[\d*\-\d*\]/.test(a)){
start=a.match(/\[\d*/);
- end=a.match(/\-\d*/);
+ end=a.match(/\-\d*]/);
start=start[0].substr(1);
end=end[0].substr(1);
@@ -203,7 +213,11 @@ App.WizardStep2Controller = Em.Controlle
});
this.hostNameArr = hostNames;
},
-
+ /**
+ * launch hosts to bootstrap
+ * and save already registered hosts
+ * @return {Boolean}
+ */
proceedNext: function(){
if (this.get('manualInstall') === true) {
this.manualInstallPopup();
@@ -226,7 +240,10 @@ App.WizardStep2Controller = Em.Controlle
this.saveHosts();
}
},
-
+ /**
+ * show popup with hosts generated by pattern
+ * @param hostNames
+ */
hostNamePatternPopup: function (hostNames) {
var self = this;
App.ModalPopup.show({
@@ -241,7 +258,10 @@ App.WizardStep2Controller = Em.Controlle
})
});
},
-
+ /**
+ * show notify that installation is manual
+ * save hosts
+ */
manualInstallPopup: function () {
var self = this;
App.ModalPopup.show({
Modified:
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step9_controller.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step9_controller.js?rev=1440750&r1=1440749&r2=1440750&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step9_controller.js
(original)
+++
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step9_controller.js
Thu Jan 31 00:28:30 2013
@@ -127,6 +127,17 @@ App.WizardStep9Controller = Em.Controlle
this.clearStep();
this.renderHosts(this.loadHosts());
},
+ /**
+ * reset status and message of all hosts when retry install
+ */
+ resetHostsForRetry: function(){
+ var hosts = this.get('content.hosts');
+ for (var name in hosts) {
+ hosts[name].status = "pending";
+ hosts[name].message = 'Waiting';
+ }
+ this.set('content.hosts', hosts);
+ },
loadHosts: function () {
var hostInfo = this.get('content.hosts');
Modified: incubator/ambari/trunk/ambari-web/app/routes/installer.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/routes/installer.js?rev=1440750&r1=1440749&r2=1440750&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/routes/installer.js (original)
+++ incubator/ambari/trunk/ambari-web/app/routes/installer.js Thu Jan 31
00:28:30 2013
@@ -319,6 +319,7 @@ module.exports = Em.Route.extend({
var isRetry = true;
installerController.installServices(isRetry);
installerController.setInfoForStep9();
+ wizardStep9Controller.resetHostsForRetry();
// We need to do recovery based on whether we are in Add Host or
Installer wizard
App.clusterStatus.setClusterStatus({
clusterName: this.get('clusterName'),