Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-1312

The SYNC_SOURCE atribute only supports unix and ldap for ranger usersync at present, it's default value should be unix. Current the installation process directly exited because of using default configuration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.7.0
    • usersync

    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

        Activity

          People

            zhangqiang2 Qiang Zhang
            zhangqiang2 Qiang Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: