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

Enhancements to the db admin setup scripts.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.5.0, 0.6.0
    • Fix Version/s: 0.7.0
    • Component/s: Ranger
    • Labels:
      None

      Description

      Improve debugging for dba_script.py, print the jisql commands in the console without the password. Ranger admin installation logs print ranger admin user password when it creates rangeradmin user.

      2016-07-17 06:07:59,156  [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "SELECT version();"
      2016-07-17 06:07:59,808  [I] Verifying user rangeradmin for Host %
      2016-07-17 06:07:59,808  [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='rangeradmin' and host='%';"
      2016-07-17 06:08:00,469  [I] MySQL user rangeradmin does not exists for host %
      2016-07-17 06:08:00,469  [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "create user 'rangeradmin'@'%' identified by 'rangeradmin';"
      2016-07-17 06:08:01,137  [I] Verifying user rangeradmin for Host %
      2016-07-17 06:08:01,137  [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='rangeradmin' and host='%';"
      2016-07-17 06:08:01,762  [I] MySQL user rangeradmin created for host %
      2016-07-17 06:08:01,762  [I] Verifying user rangeradmin for Host localhost
      2016-07-17 06:08:01,762  [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='rangeradmin' and host='localhost';"
      2016-07-17 06:08:02,362  [I] MySQL user rangeradmin does not exists for host localhost
      2016-07-17 06:08:02,363  [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "create user 'rangeradmin'@'localhost' identified by 'rangeradmin';"
      2016-07-17 06:08:02,964  [I] Verifying user rangeradmin for Host localhost
      2016-07-17 06:08:02,964  [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='rangeradmin' and host='localhost';"
      2016-07-17 06:08:03,580  [I] MySQL user rangeradmin created for host localhost
      2016-07-17 06:08:03,581  [I] Verifying user rangeradmin for Host 172.22.95.18
      2016-07-17 06:08:03,581  [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='rangeradmin' and host='172.22.95.18';"
      2016-07-17 06:08:04,144  [I] MySQL user rangeradmin does not exists for host 172.22.95.18
      2016-07-17 06:08:04,144  [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "create user 'rangeradmin'@'172.22.95.18' identified by 'rangeradmin';"
      2016-07-17 06:08:04,721  [I] Verifying user rangeradmin for Host 172.22.95.18
      2016-07-17 06:08:04,722  [JISQL] /usr/jdk64/jdk1.8.0_77/bin/java -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://172.22.95.18/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='rangeradmin' and host='172.22.95.18';"
      

        Attachments

        1. RANGER-1111-1.patch
          24 kB
          Pradeep Agrawal
        2. RANGER-1124-P3.patch
          53 kB
          Pradeep Agrawal

          Issue Links

            Activity

              People

              • Assignee:
                pradeep Pradeep Agrawal
                Reporter:
                pradeep Pradeep Agrawal
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: