You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by Qiang Zhang <zh...@zte.com.cn> on 2017/02/21 06:26:55 UTC

Review Request 56864: RANGER-1398:Missing the settings for 'ranger.usersync.unix.minGroupId' in ranger usersync module

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56864/
-----------------------------------------------------------

Review request for ranger, Don Bosco Durai and Colm O hEigeartaigh.


Bugs: RANGER-1398
    https://issues.apache.org/jira/browse/RANGER-1398


Repository: ranger


Description
-------

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.


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
-------

$ 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


Re: Review Request 56864: RANGER-1398:Missing the settings for 'ranger.usersync.unix.minGroupId' in ranger usersync module

Posted by Qiang Zhang <zh...@zte.com.cn>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56864/
-----------------------------------------------------------

(Updated \u56db\u6708 7, 2017, 7:18 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.


Changes
-------

Update the description


Bugs: RANGER-1398
    https://issues.apache.org/jira/browse/RANGER-1398


Repository: ranger


Description (updated)
-------

I checked the codes and found below codes will get 'minimumGroupId' from 'ranger-ugsync-site.xml', but I can't find this parameter in this file after execute the shell script.
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 static final String  DEFAULT_UGSYNC_MIN_GROUPID =   "0";
public String getMinGroupId() {
        String mgid = prop.getProperty(UGSYNC_MIN_GROUPID_PROP);
        if (mgid == null) {
            mgid = DEFAULT_UGSYNC_MIN_GROUPID;
        }
        return mgid;
}
I have changed the codes and we can set the value in 'ranger-ugsync-site.xml'. The reason why I default it as '500' is the values between 0 and 499 are typically reserved for 
system accounts. You can refer to below url:
http://www.archivum.info/debian-bugs-closed@lists.debian.org/2006-03/03888/Bug-333706-marked-as-done-(useradd-lacks-r-option).html


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/1/


Testing
-------

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


Re: Review Request 56864: RANGER-1398:Missing the settings for 'ranger.usersync.unix.minGroupId' in ranger usersync module

Posted by Qiang Zhang <zh...@zte.com.cn>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56864/
-----------------------------------------------------------

(Updated \u4e8c\u6708 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