-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58152/
-----------------------------------------------------------
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