Description
The SYNC_SOURCE atribute only supports unix and ldap for ranger usersync at present, it's default value is unix. But It was assigned an empty value as default configuration value in configuration file. Current the program would directly exit when user used default configuration to install ranger usersync. The logic code is as following:
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]
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
else:
print "ERROR: Invalid value (%s) defined for %s in install.properties. Only valid values are %s" % (syncSource, SYNC_SOURCE_KEY,SYNC_SOURCE_LIST)
sys.exit(1)
Attachments
Attachments
Issue Links
- links to