----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58152/#review171891 -----------------------------------------------------------
Ship it! Might want to apply the same change to `ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py`. - Attila Doroszlai On April 13, 2017, 5:21 p.m., Tim Thorpe wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58152/ > ----------------------------------------------------------- > > (Updated April 13, 2017, 5:21 p.m.) > > > Review request for Ambari, Alejandro Fernandez and Di Li. > > > Bugs: AMBARI-20666 > https://issues.apache.org/jira/browse/AMBARI-20666 > > > Repository: ambari > > > Description > ------- > > In order to avoid issues with starting and stopping services, it would be > useful to trim any commas from the beginning or ending of the user and group > lists > > > Diffs > ----- > > > ambari-server/src/main/resources/stacks/HDP/3.0/hooks/before-ANY/scripts/shared_initialization.py > 320872e > > > Diff: https://reviews.apache.org/r/58152/diff/1/ > > > Testing > ------- > > mvn clean test > > Also ran manual testing including running the code as a separate script: > > import re > > user_and_groups = ",users, group1,group2," > parts = re.split('\s', user_and_groups) > if len(parts) == 1: > parts.append("") > > users_list = parts[0].strip(",").split(",") if parts[0] else [] > groups_list = parts[1].strip(",").split(",") if parts[1] else [] > > print users_list > print groups_list > > > Thanks, > > Tim Thorpe > >
