ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject [1/2] ambari git commit: AMBARI-17789. Warning alert for Atlas is present after upgrade from 2.2.2.0 to 2.4.0.0 and disabling security (dgrinenko via dlysnichenko)
Date Wed, 20 Jul 2016 14:09:30 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 05a90bd40 -> 6ea527c2e
  refs/heads/trunk 617b71922 -> dd7f4c60c


AMBARI-17789. Warning alert for Atlas is present after upgrade from 2.2.2.0 to 2.4.0.0 and
disabling security (dgrinenko via dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/dd7f4c60
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dd7f4c60
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dd7f4c60

Branch: refs/heads/trunk
Commit: dd7f4c60c9c8c6b0cff8beb9913bbc0d7793f519
Parents: 617b719
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Wed Jul 20 17:06:46 2016 +0300
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Wed Jul 20 17:06:46 2016 +0300

----------------------------------------------------------------------
 .../ATLAS/0.1.0.2.3/package/scripts/params.py        |  4 ----
 .../ATLAS/0.1.0.2.3/package/scripts/status_params.py | 15 +++++++++++++--
 .../python/stacks/2.3/ATLAS/test_metadata_server.py  |  2 +-
 .../src/test/python/stacks/2.3/configs/default.json  |  3 +--
 .../src/test/python/stacks/2.5/configs/default.json  |  7 +++----
 5 files changed, 18 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/dd7f4c60/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index 679232e..a516210 100644
--- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -27,7 +27,6 @@ from resource_management.libraries.functions.default import default
 # Local Imports
 from status_params import *
 from resource_management.libraries.functions.stack_features import check_stack_feature
-from resource_management.libraries.functions.stack_features import get_stack_feature_version
 from resource_management.libraries.functions import StackFeature
 from resource_management.libraries.functions.is_empty import is_empty
 from resource_management.libraries.functions.expect import expect
@@ -91,9 +90,6 @@ version = default("/commandParams/version", None)
 stack_version_unformatted = config['hostLevelParams']['stack_version']
 stack_version_formatted = format_stack_version(stack_version_unformatted)
 
-# get the correct version to use for checking stack features
-version_for_stack_feature_checks = get_stack_feature_version(config)
-
 metadata_home = os.environ['METADATA_HOME_DIR'] if 'METADATA_HOME_DIR' in os.environ else
format('{stack_root}/current/atlas-server')
 metadata_bin = format("{metadata_home}/bin")
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/dd7f4c60/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/status_params.py
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/status_params.py
index f90d13d..7c52fdf 100644
--- a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/status_params.py
@@ -20,15 +20,26 @@ limitations under the License.
 import os
 from resource_management.libraries.script.script import Script
 from resource_management.libraries.functions.format import format
-from resource_management.libraries.functions import  get_kinit_path
+from resource_management.libraries.functions import  get_kinit_path, format_stack_version
 from resource_management.libraries.functions.default import default
 from resource_management.libraries.functions import conf_select
 from resource_management.libraries.functions import stack_select
 
+from resource_management.libraries.functions.stack_features import check_stack_feature, get_stack_feature_version
+from resource_management.libraries.functions import StackFeature
+
 
 config = Script.get_config()
 
-conf_file = default("/configurations/atlas-env/metadata_conf_file", "atlas-application.properties")
+default_conf_file = "application.properties"
+
+# get the correct version to use for checking stack features
+version_for_stack_feature_checks = get_stack_feature_version(config)
+
+if check_stack_feature(StackFeature.ATLAS_UPGRADE_SUPPORT, version_for_stack_feature_checks):
+  default_conf_file = "atlas-application.properties"
+
+conf_file = default("/configurations/atlas-env/metadata_conf_file", default_conf_file)
 conf_dir = os.environ['METADATA_CONF'] if 'METADATA_CONF' in os.environ else '/etc/atlas/conf'
 pid_dir = default("/configurations/atlas-env/metadata_pid_dir", "/var/run/atlas")
 pid_file = format("{pid_dir}/atlas.pid")

http://git-wip-us.apache.org/repos/asf/ambari/blob/dd7f4c60/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
index 6285bb7..9ee6c7b 100644
--- a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
+++ b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
@@ -158,7 +158,7 @@ class TestMetadataServer(RMFTestCase):
                                 owner='solr',
                                 group='hadoop',
                                 mode=0664,
-                                content = ''
+                                content=''
       )
       self.assertResourceCalledRegexp('^Execute$', '^export JAVA_HOME=/usr/jdk64/jdk1.7.0_45
; /usr/lib/ambari-logsearch-solr-client/solrCloudCli.sh --zookeeper-connect-string c6401.ambari.apache.org:2181
--znode /logsearch --check-znode --retry 5 --interval 10')
       self.assertResourceCalledRegexp('^Execute$', '^export JAVA_HOME=/usr/jdk64/jdk1.7.0_45
; /usr/lib/ambari-logsearch-solr-client/solrCloudCli.sh --zookeeper-connect-string c6401.ambari.apache.org:2181/logsearch
--download-config --config-dir /tmp/solr_config_basic_configs_0.[0-9]* --config-set basic_configs
--retry 30 --interval 5')

http://git-wip-us.apache.org/repos/asf/ambari/blob/dd7f4c60/ambari-server/src/test/python/stacks/2.3/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.3/configs/default.json b/ambari-server/src/test/python/stacks/2.3/configs/default.json
index e85ca92..9764a47 100644
--- a/ambari-server/src/test/python/stacks/2.3/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.3/configs/default.json
@@ -221,8 +221,7 @@
         "metadata_pid_dir": "/var/run/atlas",
         "metadata_log_dir": "/var/log/atlas",
         "metadata_data_dir": "/var/lib/atlas/data",
-        "metadata_expanded_war_dir": "/var/lib/atlas/server/webapp",
-        "metadata_conf_file": "application.properties"
+        "metadata_expanded_war_dir": "/var/lib/atlas/server/webapp"
       },
       "atlas-log4j": {
         "content": "<property><name>content</name><description>Custom
log4j.properties</description><value></value></property>",

http://git-wip-us.apache.org/repos/asf/ambari/blob/dd7f4c60/ambari-server/src/test/python/stacks/2.5/configs/default.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.5/configs/default.json b/ambari-server/src/test/python/stacks/2.5/configs/default.json
index d0680da..148616b 100644
--- a/ambari-server/src/test/python/stacks/2.5/configs/default.json
+++ b/ambari-server/src/test/python/stacks/2.5/configs/default.json
@@ -10,7 +10,7 @@
     "ambari_db_rca_password": "mapred",
     "ambari_db_rca_url": "jdbc:postgresql://c6401.ambari.apache.org/ambarirca",
     "jce_name": "UnlimitedJCEPolicyJDK7.zip",
-    "stack_version": "2.3",
+    "stack_version": "2.5",
     "stack_name": "HDP",
     "ambari_db_rca_driver": "org.postgresql.Driver",
     "jdk_name": "jdk-7u67-linux-x64.tar.gz",
@@ -23,7 +23,7 @@
   "serviceName": "SLIDER",
   "role": "SLIDER",
   "commandParams": {
-    "version": "2.2.1.0-2067",
+    "version": "2.5.0.0-1235",
     "command_timeout": "300",
     "service_package_folder": "OOZIE",
     "script_type": "PYTHON",
@@ -217,8 +217,7 @@
       "metadata_pid_dir": "/var/run/atlas",
       "metadata_log_dir": "/var/log/atlas",
       "metadata_data_dir": "/var/lib/atlas/data",
-      "metadata_expanded_war_dir": "/var/lib/atlas/server/webapp",
-      "metadata_conf_file": "atlas-application.properties"
+      "metadata_expanded_war_dir": "/var/lib/atlas/server/webapp"
     },
     "atlas-log4j": {
       "content": "<property><name>content</name><description>Custom
log4j.properties</description><value></value></property>",


Mime
View raw message