ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Qiang Zhang <zhangqia...@zte.com.cn>
Subject Re: Review Request 55616: The SYNC_SOURCE property only supports unix and ldap for ranger usersync at present, it's default value is unix. But It was assigned an empty value in configuration file. The SYNC_INTERVAL property has same question also.
Date Thu, 19 Jan 2017 00:51:58 GMT


> On 一月 18, 2017, 10:10 a.m., Colm O hEigeartaigh wrote:
> > I don't think the "SYNC_INTERVAL" change should be made. The default sync interval
for LDAP is 360, yet if "5" is hard-coded in install.properties, the new sync interval will
be "5" if the admin changes the sync source to LDAP.

Ok, I checked code. In the following code the program has been carried out the correct logic
when the SYNC_INTERVAL was empty in configuration file.  You are right. I had modified the
patch. Thanks.
		if (syncSource == SYNC_SOURCE_UNIX):
			ret['ranger.usersync.source.impl.class'] = 'org.apache.ranger.unixusersync.process.UnixUserGroupBuilder'
			if (SYNC_INTERVAL_NEW_KEY not in ret or len(str(ret[SYNC_INTERVAL_NEW_KEY])) == 0):
				ret[SYNC_INTERVAL_NEW_KEY] = "300000"
			else:
				ret[SYNC_INTERVAL_NEW_KEY] = int(ret[SYNC_INTERVAL_NEW_KEY]) * 60000
		elif (syncSource == SYNC_SOURCE_LDAP):
			ldapPass=ret[SYNC_LDAP_BIND_PASSWORD_KEY]
			password_validation(ldapPass, SYNC_LDAP_BIND_PASSWORD_KEY)
			ret['ranger.usersync.source.impl.class'] = 'org.apache.ranger.ldapusersync.process.LdapUserGroupBuilder'
			if (SYNC_INTERVAL_NEW_KEY not in ret or len(str(ret[SYNC_INTERVAL_NEW_KEY])) == 0):
				ret[SYNC_INTERVAL_NEW_KEY] = "3600000"
			else:
				ret[SYNC_INTERVAL_NEW_KEY] = int(ret[SYNC_INTERVAL_NEW_KEY]) * 60000


- Qiang


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


On 一月 17, 2017, 1:04 p.m., Qiang Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/55616/
> -----------------------------------------------------------
> 
> (Updated 一月 17, 2017, 1:04 p.m.)
> 
> 
> Review request for ranger, Don Bosco Durai, Ramesh Mani, Selvamohan Neethiraj, and Velmurugan
Periasamy.
> 
> 
> Bugs: RANGER-1312
>     https://issues.apache.org/jira/browse/RANGER-1312
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> The SYNC_SOURCE property only supports unix and ldap for ranger usersync at present,
it's default value is unix. But It was assigned an empty value in configuration file. The
SYNC_INTERVAL property has same question also.
> 
> 
> Diffs
> -----
> 
>   unixauthservice/scripts/install.properties e784dda 
> 
> Diff: https://reviews.apache.org/r/55616/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qiang Zhang
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message