Repository: ambari Updated Branches: refs/heads/trunk 9910c4971 -> 3f836c0a5
BUG-91896. Moving Metrics Collector Forces ZooKeeper Server Install on Target Host (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3f836c0a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3f836c0a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3f836c0a Branch: refs/heads/trunk Commit: 3f836c0a5dc97d47a4bdb6192a4cc3cdeea643ac Parents: 9910c49 Author: Alex Antonenko <[email protected]> Authored: Tue Nov 21 20:07:03 2017 +0300 Committer: Alex Antonenko <[email protected]> Committed: Tue Nov 21 20:07:03 2017 +0300 ---------------------------------------------------------------------- .../main/service/reassign/step3_controller.js | 3 +++ .../main/service/reassign/step4_controller.js | 12 ++++++++++-- .../main/service/reassign/step4_controller_test.js | 9 ++++++--- 3 files changed, 19 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/3f836c0a/ambari-web/app/controllers/main/service/reassign/step3_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/reassign/step3_controller.js b/ambari-web/app/controllers/main/service/reassign/step3_controller.js index 4898b75..d994aaf 100644 --- a/ambari-web/app/controllers/main/service/reassign/step3_controller.js +++ b/ambari-web/app/controllers/main/service/reassign/step3_controller.js @@ -286,6 +286,9 @@ App.ReassignMasterWizardStep3Controller = Em.Controller.extend({ success: 'onLoadConfigsTags' }); } + else{ + this.set('isLoaded', true); + } }, clearStep: function () { http://git-wip-us.apache.org/repos/asf/ambari/blob/3f836c0a/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 108b3e9..8e854b0 100644 --- a/ambari-web/app/controllers/main/service/reassign/step4_controller.js +++ b/ambari-web/app/controllers/main/service/reassign/step4_controller.js @@ -108,13 +108,21 @@ App.ReassignMasterWizardStep4Controller = App.HighAvailabilityProgressPageContro */ setDependentHostComponents: function (componentName) { var installedServices = App.Service.find().mapProperty('serviceName'); - var installedComponents = App.Host.find(this.get('content.reassignHosts.target')) + var hostInstalledComponents = App.Host.find(this.get('content.reassignHosts.target')) .get('hostComponents') .mapProperty('componentName'); + var clusterInstalledComponents = App.MasterComponent.find().toArray() + .concat(App.ClientComponent.find().toArray()) + .concat(App.SlaveComponent.find().toArray()) + .filter(function(service){ + return service.get("installedCount") > 0; + }) + .mapProperty('componentName'); + var dependenciesToInstall = App.StackServiceComponent.find(componentName) .get('dependencies') .filter(function (component) { - return !installedComponents.contains(component.componentName) && installedServices.contains(component.serviceName); + return !(component.scope == 'host' ? hostInstalledComponents : clusterInstalledComponents).contains(component.componentName) && (installedServices.contains(component.serviceName)); }) .mapProperty('componentName'); this.set('dependentHostComponents', dependenciesToInstall); http://git-wip-us.apache.org/repos/asf/ambari/blob/3f836c0a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js index 8eb9c9f..42f6f91 100644 --- a/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js +++ b/ambari-web/test/controllers/main/service/reassign/step4_controller_test.js @@ -1104,15 +1104,18 @@ describe('App.ReassignMasterWizardStep4Controller', function () { dependencies: [ Em.Object.create({ componentName: 'C1', - serviceName: 'S1' + serviceName: 'S1', + scope: 'host' }), Em.Object.create({ componentName: 'C2', - serviceName: 'S2' + serviceName: 'S2', + scope: 'host' }), Em.Object.create({ componentName: 'C3', - serviceName: 'S3' + serviceName: 'S3', + scope: 'host' }) ] }));
