> On Oct. 10, 2017, 7:23 a.m., Jayush Luniya wrote: > > ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java > > Line 664 (original), 664 (patched) > > <https://reviews.apache.org/r/62856/diff/1/?file=1850078#file1850078line664> > > > > We have to look at references to this function and see how the > > servicesMap is populated. > > > > For example in configHelper.createUserGroupMap() we will end up > > creating user to group mapping only for a single mpack instead of multiple > > mpacks. > > Madhuvanthi Radhakrishnan wrote: > Hi Jayush, > The reason I went ahead with the change was that all the references to > this and its overloaded counterpart populates servicesMap based on a stackId > that is obtained from either a service or a serviceComponent. So it seemed > that it is not coming from the cluster's stackid. > For eg: > AmbariManagementControllerImpl > StackId stackId = scHost.getServiceComponent().getDesiredStackId(); > StackInfo stackInfo = ambariMetaInfo.getStack(stackId.getStackName(), > stackId.getStackVersion()); > Map<String, ServiceInfo> servicesMap = > ambariMetaInfo.getServices(stackInfo.getName(), stackInfo.getVersion()); > Map<String, Set<String>> userGroupsMap = configHelper.createUserGroupsMap( > cluster, clusterDesiredConfigs, servicesMap, stackProperties); > > public Map<String, Set<String>> createUserGroupsMap( > Cluster cluster, Map<String, DesiredConfig> desiredConfigs, > Map<String, ServiceInfo> servicesMap, Set<PropertyInfo> > stackProperties) throws AmbariException {
I have made a fix in createHostAction to the way the servicesMap is being populated. Currently, it is using service stackId to get the serviceInfo list from the ambariMetaInfo. I have changed it to put all the cluster services in the servicesMap. - Madhuvanthi ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/62856/#review187503 ----------------------------------------------------------- On Oct. 12, 2017, 11:47 p.m., Madhuvanthi Radhakrishnan wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/62856/ > ----------------------------------------------------------- > > (Updated Oct. 12, 2017, 11:47 p.m.) > > > Review request for Ambari, Jonathan Hurley, Jayush Luniya, and Swapan > Shridhar. > > > Bugs: AMBARI-22181 > https://issues.apache.org/jira/browse/AMBARI-22181 > > > Repository: ambari > > > Description > ------- > > Remove cluster-stackid dependency related to Configs > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java > 6726d30e80 > > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java > d0dd7e0d9c > > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java > 98b1edf6a4 > > ambari-server/src/main/java/org/apache/ambari/server/controller/DeleteIdentityHandler.java > 29f8e2acbd > > ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java > bb7fcbed3d > > ambari-server/src/main/java/org/apache/ambari/server/state/ConfigMergeHelper.java > cf556609a4 > > ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java > 8f9d8e1b0b > > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java > 3bde889b4b > > > Diff: https://reviews.apache.org/r/62856/diff/3/ > > > Testing > ------- > > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD SUCCESS > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 11:01 min > [INFO] Finished at: 2017-10-09T21:40:34-07:00 > [INFO] Final Memory: 359M/1174M > [INFO] > ------------------------------------------------------------------------ > > > Thanks, > > Madhuvanthi Radhakrishnan > >