Repository: ambari Updated Branches: refs/heads/trunk 61d40303b -> 654b9a3b0
AMBARI-15298 Setup of Ambari DB for postgres says to use wrong .sql script (dsen) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/654b9a3b Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/654b9a3b Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/654b9a3b Branch: refs/heads/trunk Commit: 654b9a3b03252dc692728f557df19f1ff65a4032 Parents: 61d4030 Author: Dmytro Sen <[email protected]> Authored: Fri Mar 4 16:00:13 2016 +0200 Committer: Dmytro Sen <[email protected]> Committed: Fri Mar 4 16:00:13 2016 +0200 ---------------------------------------------------------------------- ambari-server/src/main/python/ambari-server.py | 8 ++------ .../main/python/ambari_server/dbConfiguration_linux.py | 2 +- ambari-server/src/test/python/TestAmbariServer.py | 10 ++++++++++ 3 files changed, 13 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/654b9a3b/ambari-server/src/main/python/ambari-server.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py index 7eecf07..bc86d32 100755 --- a/ambari-server/src/main/python/ambari-server.py +++ b/ambari-server/src/main/python/ambari-server.py @@ -327,13 +327,9 @@ def init_parser_options(parser): @OsFamilyFuncImpl(OsFamilyImpl.DEFAULT) def init_parser_options(parser): - parser.add_option('-f', '--init-script-file', - default=AmbariPath.get('/var/lib/ambari-server/' - 'resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql'), + parser.add_option('-f', '--init-script-file', default=None, help="File with setup script") - parser.add_option('-r', '--drop-script-file', default=AmbariPath.get("/var/lib/" - "ambari-server/resources/" - "Ambari-DDL-Postgres-EMBEDDED-DROP.sql"), + parser.add_option('-r', '--drop-script-file', default=None, help="File with drop script") parser.add_option('-u', '--upgrade-script-file', default=AmbariPath.get("/var/lib/" "ambari-server/resources/upgrade/ddl/" http://git-wip-us.apache.org/repos/asf/ambari/blob/654b9a3b/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py b/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py index 766c089..59c5d85 100644 --- a/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py +++ b/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py @@ -634,7 +634,7 @@ class PGConfig(LinuxDBMSConfig): def _setup_db(self): #password access to ambari-server and mapred dbname = self.database_name - scriptFile = PGConfig.POSTGRES_EMBEDDED_INIT_FILE + scriptFile = self.init_script_file username = self.database_username password = self.database_password http://git-wip-us.apache.org/repos/asf/ambari/blob/654b9a3b/ambari-server/src/test/python/TestAmbariServer.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/TestAmbariServer.py b/ambari-server/src/test/python/TestAmbariServer.py index 125868b..305ad1a 100644 --- a/ambari-server/src/test/python/TestAmbariServer.py +++ b/ambari-server/src/test/python/TestAmbariServer.py @@ -954,6 +954,8 @@ class TestAmbariServer(TestCase): del args.database_name del args.database_username del args.database_password + del args.init_script_file + del args.drop_script_file properties = Properties() properties.process_pair(JDBC_PASSWORD_PROPERTY, get_alias_string("mypwdalias")) @@ -983,6 +985,8 @@ class TestAmbariServer(TestCase): del args.database_name del args.database_username del args.database_password + del args.init_script_file + del args.drop_script_file properties = Properties() @@ -1011,6 +1015,8 @@ class TestAmbariServer(TestCase): del args.database_name del args.database_username del args.database_password + del args.init_script_file + del args.drop_script_file properties = Properties() @@ -3662,6 +3668,8 @@ class TestAmbariServer(TestCase): del args.persistence_type del args.sid_or_sname del args.jdbc_url + del args.init_script_file + del args.drop_script_file args.jdbc_driver= None args.jdbc_db = None @@ -4205,6 +4213,8 @@ class TestAmbariServer(TestCase): del args.database_username del args.database_password del args.persistence_type + del args.init_script_file + del args.drop_script_file set_silent(True)
