Updated Branches: refs/heads/trunk c0b68039c -> 139537c77
AMBARI-3555: Reassign Master (namenode HA): HDFS service check fails when standby namenode is stopped before wizard. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/139537c7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/139537c7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/139537c7 Branch: refs/heads/trunk Commit: 139537c77d4ef7dcd661a9e004904453b3d698d5 Parents: c0b6803 Author: Jaimin Jetly <[email protected]> Authored: Mon Oct 21 11:28:56 2013 -0700 Committer: Jaimin Jetly <[email protected]> Committed: Mon Oct 21 11:28:56 2013 -0700 ---------------------------------------------------------------------- .../main/service/reassign/step4_controller.js | 17 ++---- ambari-web/app/messages.js | 56 +++++++++++++------- .../templates/main/service/reassign/step5.hbs | 4 +- .../views/main/service/reassign/step5_view.js | 8 ++- 4 files changed, 49 insertions(+), 36 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/139537c7/ambari-web/app/controllers/main/service/reassign/step4_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/reassign/step4_controller.js b/ambari-web/app/controllers/main/service/reassign/step4_controller.js index 66b42d6..8c3b3f6 100644 --- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js +++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js @@ -22,7 +22,7 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro isReassign: true, - commands: ['stopNameNode', 'stopServices', 'createHostComponents', 'putHostComponentsInMaintenanceMode', 'reconfigure', 'installHostComponents', 'startZooKeeperServers', 'startNameNode', 'deleteHostComponents', 'startServices'], + commands: ['stopServices', 'createHostComponents', 'putHostComponentsInMaintenanceMode', 'reconfigure', 'installHostComponents', 'startZooKeeperServers', 'startNameNode', 'deleteHostComponents', 'startServices'], clusterDeployState: 'REASSIGN_MASTER_INSTALLING', @@ -68,14 +68,12 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro if (this.get('content.hasManualSteps')) { if (App.HostComponent.find().someProperty('componentName', 'SECONDARY_NAMENODE')) { - this.get('tasks').splice(6, 4); - this.get('tasks').splice(0, 1); + this.get('tasks').splice(5, 4); } else { - this.get('tasks').splice(8, 2); + this.get('tasks').splice(7, 2); } } else { - this.get('tasks').splice(6, 2); - this.get('tasks').splice(0, 1); + this.get('tasks').splice(5, 2); } }, @@ -93,11 +91,6 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro } }, - stopNameNode: function () { - var hostName = this.get('content.reassignHosts.source'); - this.stopComponent('NAMENODE', hostName); - }, - stopServices: function () { App.ajax.send({ name: 'reassign.stop_services', @@ -339,4 +332,4 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro } } } -}) +}); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/139537c7/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index bd9db63..7830d70 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -1091,16 +1091,15 @@ Em.I18n.translations = { 'services.reassign.step3.sourceHost':'Source Host:', 'services.reassign.step3.component':'Component name:', 'services.reassign.step4.header':'Install, Start and Test', - 'services.reassign.step4.task0.title':'Stop NameNode', - 'services.reassign.step4.task1.title':'Stop All Services', - 'services.reassign.step4.task2.title':'{0} create', - 'services.reassign.step4.task3.title':'{0} disable', - 'services.reassign.step4.task4.title':'{0} reconfigure', - 'services.reassign.step4.task5.title':'{0} install', - 'services.reassign.step4.task6.title':'Start ZooKeeper Servers', - 'services.reassign.step4.task7.title':'Start NameNode', - 'services.reassign.step4.task8.title':'{0} remove', - 'services.reassign.step4.task9.title':'Start All Services', + 'services.reassign.step4.task0.title':'Stop All Services', + 'services.reassign.step4.task1.title':'{0} create', + 'services.reassign.step4.task2.title':'{0} disable', + 'services.reassign.step4.task3.title':'{0} reconfigure', + 'services.reassign.step4.task4.title':'{0} install', + 'services.reassign.step4.task5.title':'Start ZooKeeper Servers', + 'services.reassign.step4.task6.title':'Start NameNode', + 'services.reassign.step4.task7.title':'{0} remove', + 'services.reassign.step4.task8.title':'Start All Services', 'services.reassign.step4.status.success': 'Successfully reassigned {0}', 'services.reassign.step4.status.success.withManualSteps': 'Proceed to the next step', 'services.reassign.step4.status.failed': 'Failed to reassign {0}', @@ -1108,32 +1107,51 @@ Em.I18n.translations = { 'services.reassign.step4.retry': 'You can click on the Retry or Abort button to retry failed task or abort changes', 'services.reassign.step4.abortError': 'Error in aborting changes.', 'services.reassign.step5.header': 'Manual commands', - 'services.reassign.step5.body.namenode': '<ol>' + + 'services.reassign.step5.body.namenode': + '<div class="alert alert-info">' + + '<ol>' + '<li>Copy contents of <b>{0}</b> from source host <b>{1}</b> to the target host <b>{2}</b> same locations</li>' + '<li>Login to the target host <b>{2}</b> and change permissions for the NameNode dirs by running:' + '<div class="code-snippet">chown -R hdfs:hadoop /hadoop/hdfs/namenode/</div></li>' + '<li>Create marker directory by running:' + '<div class="code-snippet">mkdir -p /var/run/hadoop/hdfs/namenode/formatted</div></li>' + '<li>Proceed next' + - '</ol>', - 'services.reassign.step5.body.namenode_ha': '<ol>' + + '</ol>' + + '</div>', + 'services.reassign.step5.body.namenode_ha': + '<div class="alert alert-info">' + + '<ol>' + + '<li>Login to the NameNode host <b>{4}</b>.</li>' + + '<li>Reset automatic failover information in ZooKeeper by running:' + + '<div class="code-snippet">sudo su -l {3} -c \'hdfs zkfc -formatZK\'</div></li>' + + '</ol>' + + '</div>' + + '<div class="alert alert-info">' + + '<ol start="3">' + '<li>Login to the newly installed NameNode host <b>{2}</b></li>' + '<li>Initialize the metadata by running:' + "<div class='code-snippet'>sudo su -l {3} -c 'hdfs namenode -bootstrapStandby'</div></li>" + - '<li>Proceed next' + - '</ol>', - 'services.reassign.step5.body.secondary_namenode': '<ol>' + + '</ol>' + + '</div>' + + 'Please proceed once you have completed the steps above.', + 'services.reassign.step5.body.secondary_namenode': + '<div class="alert alert-info">' + + '<ol>' + '<li>Copy contents of <b>{0}</b> from source host <b>{1}</b> to the target host <b>{2}</b> same locations</li>' + '<li>Login to the target host <b>{2}</b> and change permissions for the SNameNode dirs by running:' + '<div class="code-snippet">chown -R hdfs:hadoop /hadoop/hdfs/namesecondary/</div></li>' + '<li>Proceed next' + - '</ol>', - 'services.reassign.step5.body.jobtracker': '<ol>' + + '</ol>' + + '</div>', + 'services.reassign.step5.body.jobtracker': + '<div class="alert alert-info">' + + '<ol>' + '<li>Copy contents of <b>{0}</b> from source host <b>{1}</b> to the target host <b>{2}</b> same locations</li>' + '<li>Login to the target host <b>{2}</b> and change permissions for the JobTracker dirs by running:' + '<div class="code-snippet">chown -R mapred:hadoop /hadoop/mapred/</div></li>' + '<li>Proceed next' + - '</ol>', + '</ol>'+ + '</div>', 'services.reassign.step6.header': 'Install, Start and Test', 'services.reassign.step6.task0.title':'{0} remove', 'services.reassign.step6.task1.title':'Start All Services', http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/139537c7/ambari-web/app/templates/main/service/reassign/step5.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/service/reassign/step5.hbs b/ambari-web/app/templates/main/service/reassign/step5.hbs index b46de44..71d0e9e 100644 --- a/ambari-web/app/templates/main/service/reassign/step5.hbs +++ b/ambari-web/app/templates/main/service/reassign/step5.hbs @@ -16,9 +16,7 @@ * limitations under the License. }} <h2>{{t services.reassign.step5.header}}</h2> -<div class="alert alert-info"> - {{{view.bodyText}}} -</div> +{{{view.bodyText}}} <div class="btn-area"> <a class="btn btn-success pull-right" {{bindAttr disabled="isSubmitDisabled"}} {{action next}}>{{t common.next}} →</a> </div> http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/139537c7/ambari-web/app/views/main/service/reassign/step5_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/reassign/step5_view.js b/ambari-web/app/views/main/service/reassign/step5_view.js index 71bcc81..0a78a63 100644 --- a/ambari-web/app/views/main/service/reassign/step5_view.js +++ b/ambari-web/app/views/main/service/reassign/step5_view.js @@ -27,7 +27,11 @@ App.ReassignMasterWizardStep5View = Em.View.extend({ var componentDir = this.get('controller.content.componentDir'); var sourceHost = this.get('controller.content.reassignHosts.source'); var targetHost = this.get('controller.content.reassignHosts.target'); - var ha = this.get('controller.content.reassign.component_name') === 'NAMENODE' && !App.HostComponent.find().someProperty('componentName', 'SECONDARY_NAMENODE') ? '_ha' : ''; - return Em.I18n.t('services.reassign.step5.body.' + this.get('controller.content.reassign.component_name').toLowerCase() + ha).format(componentDir, sourceHost, targetHost, this.get('controller.content.hdfsUser')); + var ha = ''; + if (this.get('controller.content.reassign.component_name') === 'NAMENODE' && !App.HostComponent.find().someProperty('componentName', 'SECONDARY_NAMENODE')) { + ha = '_ha'; + var nnStartedHost = this.get('controller.content.masterComponentHosts').filterProperty('component', 'NAMENODE').mapProperty('hostName').without(this.get('controller.content.reassignHosts.target')); + } + return Em.I18n.t('services.reassign.step5.body.' + this.get('controller.content.reassign.component_name').toLowerCase() + ha).format(componentDir, sourceHost, targetHost, this.get('controller.content.hdfsUser'),nnStartedHost); }.property('controller.content.reassign.component_name', 'controller.content.componentDir', 'controller.content.masterComponentHosts', 'controller.content.reassign.host_id', 'controller.content.hdfsUser') });
