ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexantone...@apache.org
Subject ambari git commit: AMBARI-21785. Component restart instructions in case of OUT_OF_SYNC (alexantonenko)
Date Tue, 12 Sep 2017 13:28:26 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 1a44c51db -> 6e3bfa309


AMBARI-21785. Component restart instructions in case of OUT_OF_SYNC (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6e3bfa30
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6e3bfa30
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6e3bfa30

Branch: refs/heads/branch-2.6
Commit: 6e3bfa309e858a9f838375db26f0ecd895217b9b
Parents: 1a44c51
Author: Alex Antonenko <aantonenko@hortonworks.com>
Authored: Tue Sep 12 16:28:11 2017 +0300
Committer: Alex Antonenko <aantonenko@hortonworks.com>
Committed: Tue Sep 12 16:28:11 2017 +0300

----------------------------------------------------------------------
 ambari-web/app/messages.js                          |  2 ++
 .../admin/stack_upgrade/stack_upgrade_wizard.hbs    |  4 ++++
 .../main/admin/stack_upgrade/upgrade_wizard_view.js |  4 +++-
 .../admin/stack_upgrade/upgrade_wizard_view_test.js | 16 ++++++++++++++++
 4 files changed, 25 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6e3bfa30/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index e2421f4..57292c7 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1831,6 +1831,8 @@ Em.I18n.translations = {
   'admin.stackUpgrade.failedHosts.options.first': "<b>Pause Upgrade</b>, delete
the unhealthy hosts and return to the Upgrade Wizard to Proceed.",
   'admin.stackUpgrade.failedHosts.options.second': "Perform a <b>Downgrade</b>,
which will revert all hosts to the previous stack version.",
   'admin.stackUpgrade.failedHosts.options.third': "Ignore these failures and <b>Proceed</b>
for now (reconcile the failures later).",
+  'admin.stackUpgrade.failedHosts.isOutOfSync.options.first' : '<b>Pause Upgrade</b>
and restart the component',
+  'admin.stackUpgrade.failedHosts.isOutOfSync.options.second' : '<b>Restart</b>
the Ambari Agent',
   'admin.stackUpgrade.failedHosts.header': "Failed Hosts",
   'admin.stackUpgrade.failedHosts.subHeader': "Upgrade failed on {0} hosts",
   'admin.stackUpgrade.failedHosts.details': "Open Details",

http://git-wip-us.apache.org/repos/asf/ambari/blob/6e3bfa30/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs b/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
index 693d5e4..01109b8 100644
--- a/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
+++ b/ambari-web/app/templates/main/admin/stack_upgrade/stack_upgrade_wizard.hbs
@@ -180,6 +180,10 @@
                 <p>
                   {{t admin.stackUpgrade.failedHosts.options}}
                 <ul>
+                  {{#if view.isOutOfSync}}
+                    <li>{{t admin.stackUpgrade.failedHosts.isOutOfSync.options.first}}</li>
+                    <li>{{t admin.stackUpgrade.failedHosts.isOutOfSync.options.second}}</li>
+                  {{/if}}
                   <li>{{t admin.stackUpgrade.failedHosts.options.first}}</li>
                   {{#if view.isDowngradeAvailable}}
                     <li>{{t admin.stackUpgrade.failedHosts.options.second}}</li>

http://git-wip-us.apache.org/repos/asf/ambari/blob/6e3bfa30/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
index 10e34ab..a5e7730 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_wizard_view.js
@@ -192,7 +192,9 @@ App.upgradeWizardView = Em.View.extend({
    */
   isSlaveComponentFailuresItem: function () {
     var item = this.get('activeGroup.upgradeItems') && this.get('activeGroup.upgradeItems').findProperty('context',
this.get("controller.slaveFailuresContext"));
-    return item && ['HOLDING', 'HOLDING_FAILED'].contains(item.get('status'));
+    var status = item && item.get('status');
+    this.set('isOutOfSync', status === 'OUT_OF_SYNC');
+    return ['HOLDING', 'HOLDING_FAILED', 'OUT_OF_SYNC'].contains(status);
   }.property('activeGroup.upgradeItems.@each.status', 'activeGroup.upgradeItems.@each.context'),
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/6e3bfa30/ambari-web/test/views/main/admin/stack_upgrade/upgrade_wizard_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_wizard_view_test.js b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_wizard_view_test.js
index 7ae785c..8ad711e 100644
--- a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_wizard_view_test.js
+++ b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_wizard_view_test.js
@@ -868,6 +868,22 @@ describe('App.upgradeWizardView', function () {
       expect(view.get('controller.areSlaveComponentFailuresHostsLoaded')).to.be.true;
     });
   });
+  it("isSlaveComponentFailuresItem must be true when status is OUT_OF_SYNC", function ()
{
+    view.reopen({
+      activeStatuses: ['OUT_OF_SYNC'],
+      upgradeGroups: [Em.Object.create({
+        status: 'OUT_OF_SYNC'
+      })]
+    });
+    view.propertyDidChange('activeGroup');
+    view.set('activeGroup.upgradeItems', [Em.Object.create({
+      context: view.get("controller.slaveFailuresContext"),
+      status: 'OUT_OF_SYNC'
+    })]);
+
+    expect(view.get('isSlaveComponentFailuresItem')).to.be.true;
+    expect(view.get('isOutOfSync')).to.be.true;
+  });
 
   describe("#getServiceCheckItem()", function() {
     beforeEach(function () {


Mime
View raw message