You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vb...@apache.org on 2015/09/23 16:12:53 UTC
ambari git commit: AMBARI-13201. Second ambari-server silent-mode
setup does not switch DB.(vbrodetskyi)
Repository: ambari
Updated Branches:
refs/heads/branch-2.1 3b86b04d4 -> 0894b5b8a
AMBARI-13201. Second ambari-server silent-mode setup does not switch DB.(vbrodetskyi)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0894b5b8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0894b5b8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0894b5b8
Branch: refs/heads/branch-2.1
Commit: 0894b5b8a6262b6fc4bc93ecf353b8ee898eaefa
Parents: 3b86b04
Author: Vitaly Brodetskyi <vb...@hortonworks.com>
Authored: Wed Sep 23 17:12:19 2015 +0300
Committer: Vitaly Brodetskyi <vb...@hortonworks.com>
Committed: Wed Sep 23 17:12:19 2015 +0300
----------------------------------------------------------------------
ambari-server/src/main/python/ambari-server.py | 3 ++-
.../src/main/python/ambari_server/dbConfiguration.py | 11 ++---------
2 files changed, 4 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/0894b5b8/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 db6f7cc..4ac1af8 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -30,7 +30,7 @@ from ambari_commons.os_check import OSConst
from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
from ambari_commons.os_utils import remove_file
from ambari_server.BackupRestore import main as BackupRestore_main
-from ambari_server.dbConfiguration import DATABASE_NAMES
+from ambari_server.dbConfiguration import DATABASE_NAMES, LINUX_DBMS_KEYS_LIST
from ambari_server.serverConfiguration import configDefaults, get_ambari_properties, PID_NAME
from ambari_server.serverUtils import is_server_runing, refresh_stack_hash
from ambari_server.serverSetup import reset, setup, setup_jce_policy
@@ -453,6 +453,7 @@ def fix_database_options(options, parser):
parser.error("Unsupported Database " + options.dbms)
elif options.dbms is not None:
options.dbms = options.dbms.lower()
+ options.database_index = LINUX_DBMS_KEYS_LIST.index(options.dbms)
# correct port
if options.database_port is not None:
http://git-wip-us.apache.org/repos/asf/ambari/blob/0894b5b8/ambari-server/src/main/python/ambari_server/dbConfiguration.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/dbConfiguration.py b/ambari-server/src/main/python/ambari_server/dbConfiguration.py
index 85153eb..ae7d280 100644
--- a/ambari-server/src/main/python/ambari_server/dbConfiguration.py
+++ b/ambari-server/src/main/python/ambari_server/dbConfiguration.py
@@ -43,7 +43,7 @@ PASSWORD_PATTERN = "^[a-zA-Z0-9_-]*$"
DATABASE_NAMES = ["postgres", "oracle", "mysql", "mssql", "sqlanywhere"]
DATABASE_FULL_NAMES = {"oracle": "Oracle", "mysql": "MySQL", "mssql": "Microsoft SQL Server", "postgres":
"PostgreSQL", "sqlanywhere": "SQL Anywhere"}
-
+LINUX_DBMS_KEYS_LIST = [ 'embedded', 'oracle', 'mysql', 'postgres', 'mssql', 'sqlanywhere']
AMBARI_DATABASE_NAME = "ambari"
AMBARI_DATABASE_TITLE = "ambari"
@@ -326,14 +326,7 @@ class DBMSConfigFactoryLinux(DBMSConfigFactory):
from ambari_server.dbConfiguration_linux import createPGConfig, createOracleConfig, createMySQLConfig, \
createMSSQLConfig, createSQLAConfig
- self.DBMS_KEYS_LIST = [
- 'embedded',
- 'oracle',
- 'mysql',
- 'postgres',
- 'mssql',
- 'sqlanywhere'
- ]
+ self.DBMS_KEYS_LIST = LINUX_DBMS_KEYS_LIST
self.DRIVER_KEYS_LIST = [
'oracle',