Updated Branches: refs/heads/trunk b2d057065 -> 38a133e8c
AMBARI-3532: Reassign Master: Manual command does not display customized hdfs user name. (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/38a133e8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/38a133e8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/38a133e8 Branch: refs/heads/trunk Commit: 38a133e8cd9af35d8de7837278061aeb6d69dc10 Parents: b2d0570 Author: Jaimin Jetly <[email protected]> Authored: Mon Oct 28 19:15:47 2013 -0700 Committer: Jaimin Jetly <[email protected]> Committed: Mon Oct 28 19:15:47 2013 -0700 ---------------------------------------------------------------------- .../controllers/main/admin/misc_controller.js | 3 +++ .../main/service/reassign_controller.js | 1 + ambari-web/app/messages.js | 24 ++++++++++---------- ambari-web/app/routes/reassign_master_routes.js | 2 +- .../templates/main/service/reassign/step5.hbs | 4 +--- .../views/main/service/reassign/step5_view.js | 7 +++--- 6 files changed, 22 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/38a133e8/ambari-web/app/controllers/main/admin/misc_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/admin/misc_controller.js b/ambari-web/app/controllers/main/admin/misc_controller.js index 4b64370..4587a94 100644 --- a/ambari-web/app/controllers/main/admin/misc_controller.js +++ b/ambari-web/app/controllers/main/admin/misc_controller.js @@ -76,6 +76,9 @@ App.MainAdminMiscController = App.MainServiceInfoConfigsController.extend({ if(this.get("content.hdfsUser")){ this.get('content').set('hdfsUser', misc_configs.findProperty('name','hdfs_user').get("value")); } + if (this.get("content.group")) { + this.get('content').set('group', misc_configs.findProperty('name','user_group').get("value")); + } this.set('dataIsLoaded', true); } }); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/38a133e8/ambari-web/app/controllers/main/service/reassign_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/reassign_controller.js b/ambari-web/app/controllers/main/service/reassign_controller.js index df53715..1cd2a9d 100644 --- a/ambari-web/app/controllers/main/service/reassign_controller.js +++ b/ambari-web/app/controllers/main/service/reassign_controller.js @@ -53,6 +53,7 @@ App.ReassignMasterController = App.WizardController.extend({ controllerName: 'reassignMasterController', serviceName: 'MISC', hdfsUser: "hdfs", + group: "hadoop", reassign: null, componentsWithManualCommands: ['NAMENODE', 'SECONDARY_NAMENODE'], hasManualSteps: false, http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/38a133e8/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 9b2877f..146333c 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -1090,13 +1090,13 @@ Em.I18n.translations = { 'services.reassign.step1.message3': '<b>All services will be restarted as part of the wizard. You should plan a cluster maintenance window and prepare ' + 'for cluster downtime when reassigning {0}.</b>', - 'services.reassign.step2.header':'Assign Masters', + 'services.reassign.step2.header':'Assign Master', 'services.reassign.step3.header':'Review', 'services.reassign.step3.body':'Please review the changes you made', 'services.reassign.step3.targetHost':'Target Host:', 'services.reassign.step3.sourceHost':'Source Host:', 'services.reassign.step3.component':'Component name:', - 'services.reassign.step4.header':'Configure Components', + 'services.reassign.step4.header':'Configure Component', 'services.reassign.step4.task0.title':'Stop All Services', 'services.reassign.step4.task1.title':'Create {0}', 'services.reassign.step4.task2.title':'Disable {0}', @@ -1118,10 +1118,9 @@ Em.I18n.translations = { '<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>' + + '<div class="code-snippet">chown -R {3}:{5} /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>' + '</div>', 'services.reassign.step5.body.namenode_ha': @@ -1140,25 +1139,26 @@ Em.I18n.translations = { '<li>Initialize the metadata by running:' + "<div class='code-snippet'>sudo su -l {3} -c 'hdfs namenode -bootstrapStandby'</div></li>" + '</ol>' + - '</div>' + - 'Please proceed once you have completed the steps above.', + '</div>', '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' + + '<div class="code-snippet">chown -R {3}:{5} /hadoop/hdfs/namesecondary/</div></li>' + '</ol>' + '</div>', - 'services.reassign.step5.body.securityNotice': 'Note: {0}', - 'services.reassign.step5.body.securityConfigsList': 'Keytab file <b>{0}</b> containing principal <b>{1}</b> should exist on <b>{2}</b>', + 'services.reassign.step5.body.securityNotice': '<div class="alert alert-info"> <div class="alert alert-warn"> <strong>Note: </strong> Secure cluster' + + ' requires generating necessary principals for reassigned component and creating keytab files with the principal on ' + + 'the target host. The keytab file should be accessible to the service user.</div> {0} </div>', + 'services.reassign.step5.body.securityConfigsList': 'Create keytab file <b>{0}</b> with principal <b>{1}</b> on <b>{2}</b> host.', + 'services.reassign.step5.body.proceedMsg': 'Please proceed once you have completed the steps above', 'services.reassign.step5.confirmPopup.body': 'Please confirm that you have run the manual steps before continuing.', 'services.reassign.step6.header': 'Start and Test services', 'services.reassign.step6.task0.title': 'Delete disabled {0}', 'services.reassign.step6.task1.title': 'Start All Services', - 'services.reassign.step6.status.success': 'Successfully moved <b>{0}</b> from <b>{1}</b> host to <b>{2}</b> host', - 'services.reassign.step6.status.failed': 'Failed to move <b>{0}</b> from <b>{1}</b> host to <b>{2}</b> host', + 'services.reassign.step6.status.success': 'Successfully moved <b>{0}</b> from <b>{1}</b> host to <b>{2}</b> host.', + 'services.reassign.step6.status.failed': 'Failed to move <b>{0}</b> from <b>{1}</b> host to <b>{2}</b> host.', 'services.reassign.step6.status.info': 'Reassigning {0}. \nPlease wait for all tasks to be completed.', /** services page constants **/ http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/38a133e8/ambari-web/app/routes/reassign_master_routes.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/reassign_master_routes.js b/ambari-web/app/routes/reassign_master_routes.js index a707421..0079d92 100644 --- a/ambari-web/app/routes/reassign_master_routes.js +++ b/ambari-web/app/routes/reassign_master_routes.js @@ -212,7 +212,7 @@ module.exports = Em.Route.extend({ controller.dataLoading().done(function () { controller.loadAllPriorSteps(); controller.setLowerStepsDisable(5); - if ((controller.get('content.reassign.component_name') === 'NAMENODE') && (!App.HostComponent.find().someProperty('componentName', 'SECONDARY_NAMENODE'))) { + if ((controller.get('content.reassign.component_name') === 'NAMENODE') || controller.get('content.reassign.component_name') === 'SECONDARY_NAMENODE') { controller.usersLoading().done(function () { controller.connectOutlet('reassignMasterWizardStep5', controller.get('content')); }) http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/38a133e8/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 460e648..88cf862 100644 --- a/ambari-web/app/templates/main/service/reassign/step5.hbs +++ b/ambari-web/app/templates/main/service/reassign/step5.hbs @@ -18,9 +18,7 @@ <h2>{{t services.reassign.step5.header}}</h2> {{{view.manualCommands}}} {{#if view.securityNotice}} - <div class="alert alert-info"> - {{{view.securityNotice}}} - </div> + {{{view.securityNotice}}} {{/if}} <div class="btn-area"> <a class="btn btn-success pull-right" {{bindAttr disabled="isSubmitDisabled"}} {{action next}}>{{t common.next}} →</a> http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/38a133e8/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 40bccef..09981cf 100644 --- a/ambari-web/app/views/main/service/reassign/step5_view.js +++ b/ambari-web/app/views/main/service/reassign/step5_view.js @@ -35,13 +35,14 @@ App.ReassignMasterWizardStep5View = Em.View.extend({ 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); + 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,this.get('controller.content.group')); }.property('controller.content.reassign.component_name', 'controller.content.componentDir', 'controller.content.masterComponentHosts', 'controller.content.reassign.host_id', 'controller.content.hdfsUser'), securityNotice: function () { var secureConfigs = this.get('controller.content.secureConfigs'); + var proceedMsg = Em.I18n.t('services.reassign.step5.body.proceedMsg'); if (!this.get('controller.content.securityEnabled') || !secureConfigs.length) { - return ''; + return proceedMsg; } var formattedText = '<ul>'; secureConfigs.forEach(function (config) { @@ -49,6 +50,6 @@ App.ReassignMasterWizardStep5View = Em.View.extend({ config.principal.replace('_HOST', this.get('controller.content.reassignHosts.target')), this.get('controller.content.reassignHosts.target')) + '</li>'; }, this); formattedText += '</ul>'; - return Em.I18n.t('services.reassign.step5.body.securityNotice').format(formattedText); + return Em.I18n.t('services.reassign.step5.body.securityNotice').format(formattedText) + proceedMsg; }.property('controller.content.securityEnabled', 'controller.content.secureConfigs', 'controller.content.reassignHosts.target') });
