-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56864/
-----------------------------------------------------------
(Updated 二月 22, 2017, 8:22 a.m.)
Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O
hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan
Neethiraj, and Velmurugan Periasamy.
Bugs: RANGER-1398
https://issues.apache.org/jira/browse/RANGER-1398
Repository: ranger
Description (updated)
-------
I checked the codes and found we will get 'minimumGroupId' from
ranger-ugsync-site.xml, but I can't find this parameter in this file after
execute the shell script.
The reason why I set the value for 'ranger.usersync.unix.minGroupId' as 500:
The value must be non-negative. The default is to use the smallest ID value
greater than 500 and greater than every other group. Values between 0 and 499
are typically reserved for system accounts.
UnixUserGroupBuilder.java
public UnixUserGroupBuilder() {
minimumUserId = Integer.parseInt(config.getMinUserId());
minimumGroupId = Integer.parseInt(config.getMinGroupId());
......
}
UserGroupSyncConfig.java
public static final String UGSYNC_MIN_GROUPID_PROP =
"ranger.usersync.unix.minGroupId";
public String getMinGroupId() {
String mgid = prop.getProperty(UGSYNC_MIN_GROUPID_PROP);
if (mgid == null) {
mgid = DEFAULT_UGSYNC_MIN_GROUPID;
}
return mgid;
}
Currently we can't find anything about 'ranger.usersync.unix.minGroupId' in
'ranger-ugsync-site.xml' after execute setup.sh since we haven't configure it
in the files I changed in the patch.
Diffs
-----
unixauthservice/conf.dist/ranger-ugsync-default.xml 5ed5b89
unixauthservice/scripts/install.properties 13ae1e5
unixauthservice/scripts/templates/installprop2xml.properties 1a9bf36
unixauthservice/scripts/templates/ranger-ugsync-template.xml 0025dc8
Diff: https://reviews.apache.org/r/56864/diff/
Testing (updated)
-------
Test steps:
1. Build ranger source codes.
2. Follow the steps in wiki and unzip ranger-0.7.0-SNAPSHOT-usersync.tar.gz .
3. Follow the steps in wiki to configure the settings in install.properties,
then execute setup.sh .
4. Check the file 'ranger-ugsync-site.xml' and we will see
'ranger.usersync.unix.minGroupId' has been set as 500.
$ git apply --stat
0001-RANGER-1398-Missing-the-settings-for-ranger.usersync.patch
.../conf.dist/ranger-ugsync-default.xml | 4 ++++
unixauthservice/scripts/install.properties | 6 ++++++
.../scripts/templates/installprop2xml.properties | 1 +
.../scripts/templates/ranger-ugsync-template.xml | 4 ++++
4 files changed, 15 insertions(+)
$ git am --signoff <
0001-RANGER-1398-Missing-the-settings-for-ranger.usersync.patch
Applying: RANGER-1398:Missing the settings for ranger.usersync.unix.minGroupId
in ranger usersync module
Thanks,
Qiang Zhang