Преглед на файлове

AMBARI-2095. It's possible to get into a state where install retry is not possible if the agent stops heartbeating. (jaimin via yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1480835 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako преди 12 години
родител
ревизия
a4b6545a50
променени са 4 файла, в които са добавени 31 реда и са изтрити 4 реда
  1. 3 0
      CHANGES.txt
  2. 3 3
      ambari-web/app/controllers/wizard.js
  3. 2 1
      ambari-web/app/messages.js
  4. 23 0
      ambari-web/app/views/common/modal_popup.js

+ 3 - 0
CHANGES.txt

@@ -837,6 +837,9 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-2095. It's possible to get into a state where install retry is not
+ possible if the agent stops heartbeating. (jaimin via yusaku)
+
  AMBARI-2091. Custom JDK path not used when adding new hosts. (yusaku)
 
  AMBARI-2089. Post Ambari upgrade, Hive and Oozie fail to start after

+ 3 - 3
ambari-web/app/controllers/wizard.js

@@ -251,8 +251,6 @@ App.WizardController = Em.Controller.extend({
     // clear requests since we are installing services
     // and we don't want to get tasks for previous install attempts
     this.set('content.cluster.oldRequestsId', []);
-    this.set('content.cluster.requestId', null);
-
     var clusterName = this.get('content.cluster.name');
     var data;
     var name;
@@ -332,10 +330,12 @@ App.WizardController = Em.Controller.extend({
     console.log('Error message is: ' + request.responseText);
     var clusterStatus = {
       status: 'PENDING',
-      isInstallError: false,
+      requestId: this.get('content.cluster.requestId'),
+      isInstallError: true,
       isCompleted: false
     };
     this.saveClusterStatus(clusterStatus);
+    App.showAlertPopup(Em.I18n.t('common.errorPopup.header'), request.responseText);
   },
 
   bootstrapRequestId: null,

+ 2 - 1
ambari-web/app/messages.js

@@ -129,6 +129,7 @@ Em.I18n.translations = {
   'common.misc': 'Misc',
   'common.operations': 'Operations',
   'common.install': 'Install',
+  'common.errorPopup.header': 'An error has been encountered',
 
   'requestInfo.installComponents':'Install Components',
   'requestInfo.installServices':'Install Services',
@@ -1117,6 +1118,6 @@ Em.I18n.translations = {
 
   'quick.links.error.label': 'Hostname is undefined',
 
-  'contact.administrator': 'Contact System Administrator for more information!'
+  'contact.administrator': 'Contact System Administrator for more information'
 
 };

+ 23 - 0
ambari-web/app/views/common/modal_popup.js

@@ -143,4 +143,27 @@ App.showConfirmationPopup = function(primary, body, template) {
       primary();
     }
   });
+}
+
+/**
+ * Show alert popup
+ *
+ * @param {String} header - header of the popup
+ * @param {String} body - body of the popup
+ * @param {Function} primary - function to call upon clicking the OK button
+ * @return {*}
+ */
+App.showAlertPopup = function(header, body, primary) {
+  return App.ModalPopup.show({
+    primary: Em.I18n.t('ok'),
+    secondary: null,
+    header: header,
+    body: body,
+    onPrimary: function() {
+      this.hide();
+      if (primary) {
+        primary();
+      }
+    }
+  });
 }