-
Notifications
You must be signed in to change notification settings - Fork 1
ADPS-1406 Implement multiple servers in database connection Ranger #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop/2.2.0/2.6.0.4
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,7 @@ | |
| from os.path import basename | ||
| from subprocess import Popen,PIPE | ||
| from datetime import date | ||
| from pg_jdbc_util import build_pg_query_params | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only build_pg_query_params is imported; the jisql JDBC URL is built using raw self.host directly, bypassing build_pg_host_segment. This function is actually used only in ranger_install.py. Either drop the unnecessary import from the 4 files where it's not used, or hook build_pg_host_segment into the jisql URL construction there too.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. only it would just hit the |
||
| try: input = raw_input | ||
| except NameError: pass | ||
| globalDict = {} | ||
|
|
@@ -610,10 +611,11 @@ def get_jisql_cmd(self, user, password, db_name): | |
| db_ssl_cert_param=" -Djavax.net.ssl.keyStore=%s -Djavax.net.ssl.keyStorePassword=%s -Djavax.net.ssl.trustStore=%s -Djavax.net.ssl.trustStorePassword=%s " %(self.javax_net_ssl_keyStore,self.javax_net_ssl_keyStorePassword,self.javax_net_ssl_trustStore,self.javax_net_ssl_trustStorePassword) | ||
| else: | ||
| db_ssl_param="?ssl=%s&sslfactory=org.postgresql.ssl.NonValidatingFactory" %(self.db_ssl_enabled) | ||
| db_query_param = build_pg_query_params(db_ssl_param, db_host=self.host) | ||
| if is_unix: | ||
| jisql_cmd = "%s %s -cp %s:%s/jisql/lib/* org.apache.util.sql.Jisql -driver postgresql -cstring jdbc:postgresql://%s/%s%s -u %s -p '%s' -noheader -trim -c \;" %(self.JAVA_BIN, db_ssl_cert_param,self.SQL_CONNECTOR_JAR,path, self.host, db_name, db_ssl_param,user, password) | ||
| jisql_cmd = "%s %s -cp %s:%s/jisql/lib/* org.apache.util.sql.Jisql -driver postgresql -cstring jdbc:postgresql://%s/%s%s -u %s -p '%s' -noheader -trim -c \;" %(self.JAVA_BIN, db_ssl_cert_param,self.SQL_CONNECTOR_JAR,path, self.host, db_name, db_query_param,user, password) | ||
| elif os_name == "WINDOWS": | ||
| jisql_cmd = "%s %s -cp %s;%s\jisql\\lib\\* org.apache.util.sql.Jisql -driver postgresql -cstring jdbc:postgresql://%s/%s%s -u %s -p \"%s\" -noheader -trim" %(self.JAVA_BIN, db_ssl_cert_param,self.SQL_CONNECTOR_JAR, path, self.host, db_name, db_ssl_param,user, password) | ||
| jisql_cmd = "%s %s -cp %s;%s\jisql\\lib\\* org.apache.util.sql.Jisql -driver postgresql -cstring jdbc:postgresql://%s/%s%s -u %s -p \"%s\" -noheader -trim" %(self.JAVA_BIN, db_ssl_cert_param,self.SQL_CONNECTOR_JAR, path, self.host, db_name, db_query_param,user, password) | ||
| return jisql_cmd | ||
|
|
||
| def verify_user(self, root_user, db_root_password, db_user,dryMode): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent build. In kms.xml we have fileMode=544, but not there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both packages already use 544. In
admin-web.xml,pg_jdbc_util.pyinherits<fileMode>544</fileMode>from the enclosing<fileSet>(same asdb_setup.pyanddba_script.py)in kms.xml it is set explicitly to 544 as a standalone
<file>entry