[1/3] ambari git commit: Revert "AMBARI-18629. HDFS goes down after installing cluster (aonishuk) and AMBARI-18505. Ambari Status commands should enforce a timeout < heartbeat interval (aonishuk)"

2016-10-18 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-18456 532caef33 -> 159ad0032


Revert "AMBARI-18629. HDFS goes down after installing cluster (aonishuk) and 
AMBARI-18505. Ambari Status commands should enforce a timeout < heartbeat 
interval (aonishuk)"


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: c3b31d6f7461625d6a7fe533025c5f604c67ffb5
Parents: 7ed5259
Author: Andrew Onishuk 
Authored: Wed Oct 19 01:52:05 2016 +0300
Committer: Andrew Onishuk 
Committed: Wed Oct 19 01:52:05 2016 +0300

--
 ambari-agent/conf/unix/ambari-agent.ini |  1 -
 .../src/main/python/ambari_agent/ActionQueue.py | 16 +---
 .../ambari_agent/PythonReflectiveExecutor.py| 25 +++-
 .../test/python/ambari_agent/TestActionQueue.py |  3 +-
 .../main/python/ambari_commons/thread_utils.py  | 43 
 5 files changed, 8 insertions(+), 80 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c3b31d6f/ambari-agent/conf/unix/ambari-agent.ini
--
diff --git a/ambari-agent/conf/unix/ambari-agent.ini 
b/ambari-agent/conf/unix/ambari-agent.ini
index 1c39c24..914e09a 100644
--- a/ambari-agent/conf/unix/ambari-agent.ini
+++ b/ambari-agent/conf/unix/ambari-agent.ini
@@ -32,7 +32,6 @@ tolerate_download_failures=true
 run_as_user=root
 parallel_execution=0
 alert_grace_period=5
-status_command_timeout=2
 alert_kinit_timeout=1440
 system_resource_overrides=/etc/resource_overrides
 ; memory_threshold_soft_mb=400

http://git-wip-us.apache.org/repos/asf/ambari/blob/c3b31d6f/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py 
b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
index 5962d94..f104939 100644
--- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
+++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
@@ -29,14 +29,12 @@ import time
 import signal
 
 from AgentException import AgentException
-from PythonReflectiveExecutor import PythonReflectiveExecutor
 from LiveStatus import LiveStatus
 from ActualConfigHandler import ActualConfigHandler
 from CommandStatusDict import CommandStatusDict
 from CustomServiceOrchestrator import CustomServiceOrchestrator
 from ambari_agent.BackgroundCommandExecutionHandle import 
BackgroundCommandExecutionHandle
 from ambari_commons.str_utils import split_on_chunks
-from ambari_commons.thread_utils import terminate_thread
 
 
 logger = logging.getLogger()
@@ -87,7 +85,6 @@ class ActionQueue(threading.Thread):
 self.tmpdir = config.get('agent', 'prefix')
 self.customServiceOrchestrator = CustomServiceOrchestrator(config, 
controller)
 self.parallel_execution = config.get_parallel_exec_option()
-self.status_command_timeout = int(self.config.get('agent', 
'status_command_timeout', 2))
 if self.parallel_execution == 1:
   logger.info("Parallel execution is enabled, will execute agent commands 
in parallel")
 
@@ -228,18 +225,7 @@ class ActionQueue(threading.Thread):
   if self.controller.recovery_manager.enabled():
 self.controller.recovery_manager.stop_execution_command()
   elif commandType == self.STATUS_COMMAND:
-component_name = command['componentName']
-
-thread = threading.Thread(target = self.execute_status_command, args = 
(command,))
-thread.daemon = True # hanging status commands should not be prevent 
ambari-agent from stopping
-thread.start()
-thread.join(timeout=self.status_command_timeout)
-
-if thread.isAlive():
-  terminate_thread(thread)
-  # Force context to reset to normal. By context we mean sys.path, 
imports, logger setting, etc. They are set by specific status command, and are 
not relevant to ambari-agent.
-  PythonReflectiveExecutor.last_context.revert()
-  logger.warn("Command {0} for {1} was running for more than {2} 
seconds. Terminated due to timeout.".format(commandType, component_name, 
self.status_command_timeout))
+self.execute_status_command(command)
   else:
 logger.error("Unrecognized command " + pprint.pformat(command))
 except Exception:

http://git-wip-us.apache.org/repos/asf/ambari/blob/c3b31d6f/ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py
--
diff --git 

[3/3] ambari git commit: Merge branch 'trunk' into branch-feature-AMBARI-18456

2016-10-18 Thread jonathanhurley
Merge branch 'trunk' into branch-feature-AMBARI-18456


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 159ad00328af9ed7a7b7130904d53210a7b41146
Parents: 532caef 7be0418
Author: Jonathan Hurley 
Authored: Tue Oct 18 23:02:47 2016 -0400
Committer: Jonathan Hurley 
Committed: Tue Oct 18 23:02:47 2016 -0400

--
 .gitignore  |  1 +
 ambari-admin/pom.xml|  2 +-
 .../main/resources/ui/admin-web/package.json|  2 +-
 ambari-agent/conf/unix/ambari-agent.ini |  1 -
 .../src/main/python/ambari_agent/ActionQueue.py | 16 +--
 .../ambari_agent/PythonReflectiveExecutor.py| 25 +++---
 .../test/python/ambari_agent/TestActionQueue.py |  3 +-
 .../main/python/ambari_commons/thread_utils.py  | 43 -
 ambari-web/app/styles/common.less   | 10 ++--
 ambari-web/karma.conf.js|  4 +-
 ambari-web/package.json |  9 ++--
 ambari-web/pom.xml  | 49 
 contrib/views/capacity-scheduler/pom.xml|  4 +-
 .../src/main/resources/ui/package.json  |  2 +-
 contrib/views/files/pom.xml |  4 +-
 contrib/views/hawq/pom.xml  |  2 +-
 contrib/views/hive-next/pom.xml |  4 +-
 .../src/main/resources/ui/hive-web/package.json |  2 +-
 contrib/views/hive/pom.xml  |  4 +-
 .../src/main/resources/ui/hive-web/package.json |  2 +-
 contrib/views/hueambarimigration/pom.xml|  4 +-
 contrib/views/jobs/pom.xml  |  4 +-
 contrib/views/pig/pom.xml   |  4 +-
 .../src/main/resources/ui/pig-web/package.json  |  2 +-
 contrib/views/wfmanager/pom.xml |  4 +-
 25 files changed, 83 insertions(+), 124 deletions(-)
--




ambari git commit: AMBARI-18245 Upgrade node to version 4.x (zhewang)

2016-10-18 Thread zhewang
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 db4aef04e -> 1b32cd042


AMBARI-18245 Upgrade node to version 4.x (zhewang)


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

Branch: refs/heads/branch-2.5
Commit: 1b32cd0427e4a7de0cc5af65746d620cb2db448c
Parents: db4aef0
Author: Zhe (Joe) Wang 
Authored: Tue Oct 18 17:19:42 2016 -0700
Committer: Zhe (Joe) Wang 
Committed: Tue Oct 18 17:24:32 2016 -0700

--
 .gitignore  |  1 +
 ambari-admin/pom.xml|  2 +-
 .../main/resources/ui/admin-web/package.json|  2 +-
 ambari-web/app/styles/common.less   | 10 ++--
 ambari-web/karma.conf.js|  4 +-
 ambari-web/package.json |  9 ++--
 ambari-web/pom.xml  | 49 
 contrib/views/capacity-scheduler/pom.xml|  4 +-
 .../src/main/resources/ui/package.json  |  2 +-
 contrib/views/files/pom.xml |  4 +-
 contrib/views/hawq/pom.xml  |  2 +-
 contrib/views/hive-next/pom.xml |  4 +-
 .../src/main/resources/ui/hive-web/package.json |  2 +-
 contrib/views/hive/pom.xml  |  4 +-
 .../src/main/resources/ui/hive-web/package.json |  2 +-
 contrib/views/hueambarimigration/pom.xml|  4 +-
 contrib/views/jobs/pom.xml  |  4 +-
 contrib/views/pig/pom.xml   |  4 +-
 .../src/main/resources/ui/pig-web/package.json  |  2 +-
 contrib/views/wfmanager/pom.xml |  4 +-
 20 files changed, 75 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1b32cd04/.gitignore
--
diff --git a/.gitignore b/.gitignore
index d9f23de..43edfd9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@ target
 /ambari-web/npm-debug.log
 /ambari-web/public/
 /ambari-web/node_modules/
+/ambari-web/node/
 *.pyc
 *.py~
 *.iml

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b32cd04/ambari-admin/pom.xml
--
diff --git a/ambari-admin/pom.xml b/ambari-admin/pom.xml
index e42e5a5..97d5fd4 100644
--- a/ambari-admin/pom.xml
+++ b/ambari-admin/pom.xml
@@ -63,7 +63,7 @@
 frontend-maven-plugin
 0.0.16
 
-  v0.10.44
+  v4.5.0
   2.15.0
   src/main/resources/ui/admin-web/
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b32cd04/ambari-admin/src/main/resources/ui/admin-web/package.json
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/package.json 
b/ambari-admin/src/main/resources/ui/admin-web/package.json
index 42f584e..efcd9d4 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/package.json
+++ b/ambari-admin/src/main/resources/ui/admin-web/package.json
@@ -24,7 +24,7 @@
 "karma-jasmine": "0.1.5",
 "karma-ng-html2js-preprocessor": "^0.1.0",
 "karma-phantomjs-launcher": "0.1",
-"phantomjs": "1.9.10",
+"phantomjs": "1.9.20",
 "protractor": "1.0.0"
   },
   "scripts": {

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b32cd04/ambari-web/app/styles/common.less
--
diff --git a/ambari-web/app/styles/common.less 
b/ambari-web/app/styles/common.less
index bc11d4d..7941fc7 100644
--- a/ambari-web/app/styles/common.less
+++ b/ambari-web/app/styles/common.less
@@ -47,19 +47,19 @@
 @spinner-small-width: 30px;
 @spinner-small-height: 30px;
 
-(~".@{health-status-red-icon}") {
+.@{health-status-red-icon} {
   color: @health-status-red;
 }
-(~".@{health-status-green-icon}") {
+.@{health-status-green-icon} {
   color: @health-status-green;
 }
-(~".@{health-status-yellow-icon}") {
+.@{health-status-yellow-icon} {
   color: @health-status-yellow;
 }
-(~".@{health-status-orange-icon}") {
+.@{health-status-orange-icon} {
   color: @health-status-orange;
 }
-(~".@{maintenance-icon}") {
+.@{maintenance-icon} {
   color: @maintenance-black;
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b32cd04/ambari-web/karma.conf.js
--
diff --git a/ambari-web/karma.conf.js b/ambari-web/karma.conf.js
index 3c79675..e144a84 100644
--- a/ambari-web/karma.conf.js
+++ b/ambari-web/karma.conf.js
@@ -28,7 +28,7 @@ module.exports = function(config) {
   'karma-sinon',
   'karma-phantomjs-launcher',
   

ambari git commit: AMBARI-18245 Upgrade node to version 4.x (zhewang)

2016-10-18 Thread zhewang
Repository: ambari
Updated Branches:
  refs/heads/trunk c3b31d6f7 -> 7be041894


AMBARI-18245 Upgrade node to version 4.x (zhewang)


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

Branch: refs/heads/trunk
Commit: 7be041894a6384a211aee965be36b1d429103fb3
Parents: c3b31d6
Author: Zhe (Joe) Wang 
Authored: Tue Oct 18 17:19:42 2016 -0700
Committer: Zhe (Joe) Wang 
Committed: Tue Oct 18 17:19:42 2016 -0700

--
 .gitignore  |  1 +
 ambari-admin/pom.xml|  2 +-
 .../main/resources/ui/admin-web/package.json|  2 +-
 ambari-web/app/styles/common.less   | 10 ++--
 ambari-web/karma.conf.js|  4 +-
 ambari-web/package.json |  9 ++--
 ambari-web/pom.xml  | 49 
 contrib/views/capacity-scheduler/pom.xml|  4 +-
 .../src/main/resources/ui/package.json  |  2 +-
 contrib/views/files/pom.xml |  4 +-
 contrib/views/hawq/pom.xml  |  2 +-
 contrib/views/hive-next/pom.xml |  4 +-
 .../src/main/resources/ui/hive-web/package.json |  2 +-
 contrib/views/hive/pom.xml  |  4 +-
 .../src/main/resources/ui/hive-web/package.json |  2 +-
 contrib/views/hueambarimigration/pom.xml|  4 +-
 contrib/views/jobs/pom.xml  |  4 +-
 contrib/views/pig/pom.xml   |  4 +-
 .../src/main/resources/ui/pig-web/package.json  |  2 +-
 contrib/views/wfmanager/pom.xml |  4 +-
 20 files changed, 75 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7be04189/.gitignore
--
diff --git a/.gitignore b/.gitignore
index d9f23de..43edfd9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@ target
 /ambari-web/npm-debug.log
 /ambari-web/public/
 /ambari-web/node_modules/
+/ambari-web/node/
 *.pyc
 *.py~
 *.iml

http://git-wip-us.apache.org/repos/asf/ambari/blob/7be04189/ambari-admin/pom.xml
--
diff --git a/ambari-admin/pom.xml b/ambari-admin/pom.xml
index e057178..4a8bba3 100644
--- a/ambari-admin/pom.xml
+++ b/ambari-admin/pom.xml
@@ -63,7 +63,7 @@
 frontend-maven-plugin
 0.0.16
 
-  v0.10.44
+  v4.5.0
   2.15.0
   src/main/resources/ui/admin-web/
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/7be04189/ambari-admin/src/main/resources/ui/admin-web/package.json
--
diff --git a/ambari-admin/src/main/resources/ui/admin-web/package.json 
b/ambari-admin/src/main/resources/ui/admin-web/package.json
index 42f584e..efcd9d4 100644
--- a/ambari-admin/src/main/resources/ui/admin-web/package.json
+++ b/ambari-admin/src/main/resources/ui/admin-web/package.json
@@ -24,7 +24,7 @@
 "karma-jasmine": "0.1.5",
 "karma-ng-html2js-preprocessor": "^0.1.0",
 "karma-phantomjs-launcher": "0.1",
-"phantomjs": "1.9.10",
+"phantomjs": "1.9.20",
 "protractor": "1.0.0"
   },
   "scripts": {

http://git-wip-us.apache.org/repos/asf/ambari/blob/7be04189/ambari-web/app/styles/common.less
--
diff --git a/ambari-web/app/styles/common.less 
b/ambari-web/app/styles/common.less
index a053d28..fe15edc2 100644
--- a/ambari-web/app/styles/common.less
+++ b/ambari-web/app/styles/common.less
@@ -51,19 +51,19 @@
 @spinner-small-width: 30px;
 @spinner-small-height: 30px;
 
-(~".@{health-status-red-icon}") {
+.@{health-status-red-icon} {
   color: @health-status-red;
 }
-(~".@{health-status-green-icon}") {
+.@{health-status-green-icon} {
   color: @health-status-green;
 }
-(~".@{health-status-yellow-icon}") {
+.@{health-status-yellow-icon} {
   color: @health-status-yellow;
 }
-(~".@{health-status-orange-icon}") {
+.@{health-status-orange-icon} {
   color: @health-status-orange;
 }
-(~".@{maintenance-icon}") {
+.@{maintenance-icon} {
   color: @maintenance-black;
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/7be04189/ambari-web/karma.conf.js
--
diff --git a/ambari-web/karma.conf.js b/ambari-web/karma.conf.js
index 7442b95..58f9b88 100644
--- a/ambari-web/karma.conf.js
+++ b/ambari-web/karma.conf.js
@@ -28,7 +28,7 @@ module.exports = function(config) {
   'karma-sinon',
   'karma-phantomjs-launcher',
   

ambari git commit: AMBARI-18307. Add sqlline capability to AMS collector to help debugging. (swagle)

2016-10-18 Thread swagle
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 ac32c2885 -> db4aef04e


AMBARI-18307. Add sqlline capability to AMS collector to help debugging. 
(swagle)


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

Branch: refs/heads/branch-2.5
Commit: db4aef04e99697d4681e592294889c925bbd64ce
Parents: ac32c28
Author: Siddharth Wagle 
Authored: Tue Oct 18 15:56:11 2016 -0700
Committer: Siddharth Wagle 
Committed: Tue Oct 18 15:56:30 2016 -0700

--
 ambari-metrics/ambari-metrics-assembly/pom.xml  |  13 ++
 .../conf/unix/sqlline/log4j.properties  |  76 
 .../conf/unix/sqlline/phoenix_utils.py  | 193 +++
 .../conf/unix/sqlline/sqlline.py| 105 ++
 .../ambari-metrics-timelineservice/pom.xml  |  13 ++
 5 files changed, 400 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/db4aef04/ambari-metrics/ambari-metrics-assembly/pom.xml
--
diff --git a/ambari-metrics/ambari-metrics-assembly/pom.xml 
b/ambari-metrics/ambari-metrics-assembly/pom.xml
index f6cb361..a55ae57 100644
--- a/ambari-metrics/ambari-metrics-assembly/pom.xml
+++ b/ambari-metrics/ambari-metrics-assembly/pom.xml
@@ -309,6 +309,19 @@
   
 
 
+  
/usr/lib/ambari-metrics-collector/bin
+  755
+  root
+  root
+  false
+  
+
+  
${collector.dir}/conf/unix/sqlline
+  false
+
+  
+
+
   /etc/ambari-metrics-collector/conf
   true
   

http://git-wip-us.apache.org/repos/asf/ambari/blob/db4aef04/ambari-metrics/ambari-metrics-timelineservice/conf/unix/sqlline/log4j.properties
--
diff --git 
a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/sqlline/log4j.properties
 
b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/sqlline/log4j.properties
new file mode 100644
index 000..3f7760a
--- /dev/null
+++ 
b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/sqlline/log4j.properties
@@ -0,0 +1,76 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+
+# Define some default values that can be overridden by system properties
+psql.root.logger=WARN,console
+psql.log.dir=.
+psql.log.file=psql.log
+hadoop.log.dir=.
+
+# Define the root logger to the system property "plsql.root.logger".
+log4j.rootLogger=${psql.root.logger}
+
+# Logging Threshold to INFO for query-server. root logger still at WARN for 
sqlline clients.
+log4j.threshold=INFO
+
+#
+# Daily Rolling File Appender
+#
+log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.DRFA.File=${psql.log.dir}/${psql.log.file}
+
+# Rollver at midnight
+log4j.appender.DRFA.DatePattern=.-MM-dd
+
+# 30-day backup
+#log4j.appender.DRFA.MaxBackupIndex=30
+log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
+
+# Pattern format: Date LogLevel LoggerName LogMessage
+log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
+
+# Debugging Pattern format
+#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} 
(%F:%M(%L)) - %m%n
+
+#
+# Null Appender
+#
+log4j.appender.NullAppender=org.apache.log4j.varia.NullAppender
+
+#
+# console
+# Add "console" to rootlogger above if you want to use this 
+#
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.target=System.err
+log4j.appender.console.layout=org.apache.log4j.PatternLayout

ambari git commit: Revert "AMBARI-18629. HDFS goes down after installing cluster (aonishuk) and AMBARI-18505. Ambari Status commands should enforce a timeout < heartbeat interval (aonishuk)"

2016-10-18 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 7ed5259d4 -> c3b31d6f7


Revert "AMBARI-18629. HDFS goes down after installing cluster (aonishuk) and 
AMBARI-18505. Ambari Status commands should enforce a timeout < heartbeat 
interval (aonishuk)"


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

Branch: refs/heads/trunk
Commit: c3b31d6f7461625d6a7fe533025c5f604c67ffb5
Parents: 7ed5259
Author: Andrew Onishuk 
Authored: Wed Oct 19 01:52:05 2016 +0300
Committer: Andrew Onishuk 
Committed: Wed Oct 19 01:52:05 2016 +0300

--
 ambari-agent/conf/unix/ambari-agent.ini |  1 -
 .../src/main/python/ambari_agent/ActionQueue.py | 16 +---
 .../ambari_agent/PythonReflectiveExecutor.py| 25 +++-
 .../test/python/ambari_agent/TestActionQueue.py |  3 +-
 .../main/python/ambari_commons/thread_utils.py  | 43 
 5 files changed, 8 insertions(+), 80 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c3b31d6f/ambari-agent/conf/unix/ambari-agent.ini
--
diff --git a/ambari-agent/conf/unix/ambari-agent.ini 
b/ambari-agent/conf/unix/ambari-agent.ini
index 1c39c24..914e09a 100644
--- a/ambari-agent/conf/unix/ambari-agent.ini
+++ b/ambari-agent/conf/unix/ambari-agent.ini
@@ -32,7 +32,6 @@ tolerate_download_failures=true
 run_as_user=root
 parallel_execution=0
 alert_grace_period=5
-status_command_timeout=2
 alert_kinit_timeout=1440
 system_resource_overrides=/etc/resource_overrides
 ; memory_threshold_soft_mb=400

http://git-wip-us.apache.org/repos/asf/ambari/blob/c3b31d6f/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py 
b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
index 5962d94..f104939 100644
--- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
+++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
@@ -29,14 +29,12 @@ import time
 import signal
 
 from AgentException import AgentException
-from PythonReflectiveExecutor import PythonReflectiveExecutor
 from LiveStatus import LiveStatus
 from ActualConfigHandler import ActualConfigHandler
 from CommandStatusDict import CommandStatusDict
 from CustomServiceOrchestrator import CustomServiceOrchestrator
 from ambari_agent.BackgroundCommandExecutionHandle import 
BackgroundCommandExecutionHandle
 from ambari_commons.str_utils import split_on_chunks
-from ambari_commons.thread_utils import terminate_thread
 
 
 logger = logging.getLogger()
@@ -87,7 +85,6 @@ class ActionQueue(threading.Thread):
 self.tmpdir = config.get('agent', 'prefix')
 self.customServiceOrchestrator = CustomServiceOrchestrator(config, 
controller)
 self.parallel_execution = config.get_parallel_exec_option()
-self.status_command_timeout = int(self.config.get('agent', 
'status_command_timeout', 2))
 if self.parallel_execution == 1:
   logger.info("Parallel execution is enabled, will execute agent commands 
in parallel")
 
@@ -228,18 +225,7 @@ class ActionQueue(threading.Thread):
   if self.controller.recovery_manager.enabled():
 self.controller.recovery_manager.stop_execution_command()
   elif commandType == self.STATUS_COMMAND:
-component_name = command['componentName']
-
-thread = threading.Thread(target = self.execute_status_command, args = 
(command,))
-thread.daemon = True # hanging status commands should not be prevent 
ambari-agent from stopping
-thread.start()
-thread.join(timeout=self.status_command_timeout)
-
-if thread.isAlive():
-  terminate_thread(thread)
-  # Force context to reset to normal. By context we mean sys.path, 
imports, logger setting, etc. They are set by specific status command, and are 
not relevant to ambari-agent.
-  PythonReflectiveExecutor.last_context.revert()
-  logger.warn("Command {0} for {1} was running for more than {2} 
seconds. Terminated due to timeout.".format(commandType, component_name, 
self.status_command_timeout))
+self.execute_status_command(command)
   else:
 logger.error("Unrecognized command " + pprint.pformat(command))
 except Exception:

http://git-wip-us.apache.org/repos/asf/ambari/blob/c3b31d6f/ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py
--
diff --git 

ambari git commit: Revert "AMBARI-18629. HDFS goes down after installing cluster (aonishuk) and AMBARI-18505. Ambari Status commands should enforce a timeout < heartbeat interval (aonishuk)"

2016-10-18 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 8564be100 -> ac32c2885


Revert "AMBARI-18629. HDFS goes down after installing cluster (aonishuk) and 
AMBARI-18505. Ambari Status commands should enforce a timeout < heartbeat 
interval (aonishuk)"


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

Branch: refs/heads/branch-2.5
Commit: ac32c2885865bdb13fcd28b1e6e2283df61a6ec7
Parents: 8564be1
Author: Andrew Onishuk 
Authored: Wed Oct 19 01:49:30 2016 +0300
Committer: Andrew Onishuk 
Committed: Wed Oct 19 01:49:30 2016 +0300

--
 ambari-agent/conf/unix/ambari-agent.ini |  1 -
 .../src/main/python/ambari_agent/ActionQueue.py | 16 +---
 .../ambari_agent/PythonReflectiveExecutor.py| 25 +++-
 .../test/python/ambari_agent/TestActionQueue.py |  3 +-
 .../main/python/ambari_commons/thread_utils.py  | 43 
 5 files changed, 8 insertions(+), 80 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ac32c288/ambari-agent/conf/unix/ambari-agent.ini
--
diff --git a/ambari-agent/conf/unix/ambari-agent.ini 
b/ambari-agent/conf/unix/ambari-agent.ini
index 1c39c24..914e09a 100644
--- a/ambari-agent/conf/unix/ambari-agent.ini
+++ b/ambari-agent/conf/unix/ambari-agent.ini
@@ -32,7 +32,6 @@ tolerate_download_failures=true
 run_as_user=root
 parallel_execution=0
 alert_grace_period=5
-status_command_timeout=2
 alert_kinit_timeout=1440
 system_resource_overrides=/etc/resource_overrides
 ; memory_threshold_soft_mb=400

http://git-wip-us.apache.org/repos/asf/ambari/blob/ac32c288/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py 
b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
index 5962d94..f104939 100644
--- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
+++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
@@ -29,14 +29,12 @@ import time
 import signal
 
 from AgentException import AgentException
-from PythonReflectiveExecutor import PythonReflectiveExecutor
 from LiveStatus import LiveStatus
 from ActualConfigHandler import ActualConfigHandler
 from CommandStatusDict import CommandStatusDict
 from CustomServiceOrchestrator import CustomServiceOrchestrator
 from ambari_agent.BackgroundCommandExecutionHandle import 
BackgroundCommandExecutionHandle
 from ambari_commons.str_utils import split_on_chunks
-from ambari_commons.thread_utils import terminate_thread
 
 
 logger = logging.getLogger()
@@ -87,7 +85,6 @@ class ActionQueue(threading.Thread):
 self.tmpdir = config.get('agent', 'prefix')
 self.customServiceOrchestrator = CustomServiceOrchestrator(config, 
controller)
 self.parallel_execution = config.get_parallel_exec_option()
-self.status_command_timeout = int(self.config.get('agent', 
'status_command_timeout', 2))
 if self.parallel_execution == 1:
   logger.info("Parallel execution is enabled, will execute agent commands 
in parallel")
 
@@ -228,18 +225,7 @@ class ActionQueue(threading.Thread):
   if self.controller.recovery_manager.enabled():
 self.controller.recovery_manager.stop_execution_command()
   elif commandType == self.STATUS_COMMAND:
-component_name = command['componentName']
-
-thread = threading.Thread(target = self.execute_status_command, args = 
(command,))
-thread.daemon = True # hanging status commands should not be prevent 
ambari-agent from stopping
-thread.start()
-thread.join(timeout=self.status_command_timeout)
-
-if thread.isAlive():
-  terminate_thread(thread)
-  # Force context to reset to normal. By context we mean sys.path, 
imports, logger setting, etc. They are set by specific status command, and are 
not relevant to ambari-agent.
-  PythonReflectiveExecutor.last_context.revert()
-  logger.warn("Command {0} for {1} was running for more than {2} 
seconds. Terminated due to timeout.".format(commandType, component_name, 
self.status_command_timeout))
+self.execute_status_command(command)
   else:
 logger.error("Unrecognized command " + pprint.pformat(command))
 except Exception:

http://git-wip-us.apache.org/repos/asf/ambari/blob/ac32c288/ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py
--
diff --git 

ambari git commit: Revert "AMBARI-18629. HDFS goes down after installing cluster (aonishuk) and AMBARI-18505. Ambari Status commands should enforce a timeout < heartbeat interval (aonishuk)"

2016-10-18 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 9332b381b -> af528b5c9


Revert "AMBARI-18629. HDFS goes down after installing cluster (aonishuk) and 
AMBARI-18505. Ambari Status commands should enforce a timeout < heartbeat 
interval (aonishuk)"


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

Branch: refs/heads/branch-2.4
Commit: af528b5c9786b1b2d9a0dc7b3f609728acf4d87e
Parents: 9332b38
Author: Andrew Onishuk 
Authored: Wed Oct 19 01:46:07 2016 +0300
Committer: Andrew Onishuk 
Committed: Wed Oct 19 01:46:07 2016 +0300

--
 ambari-agent/conf/unix/ambari-agent.ini |  1 -
 .../src/main/python/ambari_agent/ActionQueue.py | 16 +---
 .../ambari_agent/PythonReflectiveExecutor.py| 25 +++-
 .../test/python/ambari_agent/TestActionQueue.py |  3 +-
 .../main/python/ambari_commons/thread_utils.py  | 43 
 5 files changed, 8 insertions(+), 80 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/af528b5c/ambari-agent/conf/unix/ambari-agent.ini
--
diff --git a/ambari-agent/conf/unix/ambari-agent.ini 
b/ambari-agent/conf/unix/ambari-agent.ini
index 1c39c24..914e09a 100644
--- a/ambari-agent/conf/unix/ambari-agent.ini
+++ b/ambari-agent/conf/unix/ambari-agent.ini
@@ -32,7 +32,6 @@ tolerate_download_failures=true
 run_as_user=root
 parallel_execution=0
 alert_grace_period=5
-status_command_timeout=2
 alert_kinit_timeout=1440
 system_resource_overrides=/etc/resource_overrides
 ; memory_threshold_soft_mb=400

http://git-wip-us.apache.org/repos/asf/ambari/blob/af528b5c/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py 
b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
index dedef76..064e4f0 100644
--- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
+++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
@@ -29,14 +29,12 @@ import time
 import signal
 
 from AgentException import AgentException
-from PythonReflectiveExecutor import PythonReflectiveExecutor
 from LiveStatus import LiveStatus
 from ActualConfigHandler import ActualConfigHandler
 from CommandStatusDict import CommandStatusDict
 from CustomServiceOrchestrator import CustomServiceOrchestrator
 from ambari_agent.BackgroundCommandExecutionHandle import 
BackgroundCommandExecutionHandle
 from ambari_commons.str_utils import split_on_chunks
-from ambari_commons.thread_utils import terminate_thread
 
 
 logger = logging.getLogger()
@@ -86,7 +84,6 @@ class ActionQueue(threading.Thread):
 self.tmpdir = config.get('agent', 'prefix')
 self.customServiceOrchestrator = CustomServiceOrchestrator(config, 
controller)
 self.parallel_execution = config.get_parallel_exec_option()
-self.status_command_timeout = int(self.config.get('agent', 
'status_command_timeout', 2))
 if self.parallel_execution == 1:
   logger.info("Parallel execution is enabled, will execute agent commands 
in parallel")
 
@@ -227,18 +224,7 @@ class ActionQueue(threading.Thread):
   if self.controller.recovery_manager.enabled():
 self.controller.recovery_manager.stop_execution_command()
   elif commandType == self.STATUS_COMMAND:
-component_name = command['componentName']
-
-thread = threading.Thread(target = self.execute_status_command, args = 
(command,))
-thread.daemon = True # hanging status commands should not be prevent 
ambari-agent from stopping
-thread.start()
-thread.join(timeout=self.status_command_timeout)
-
-if thread.isAlive():
-  terminate_thread(thread)
-  # Force context to reset to normal. By context we mean sys.path, 
imports, logger setting, etc. They are set by specific status command, and are 
not relevant to ambari-agent.
-  PythonReflectiveExecutor.last_context.revert()
-  logger.warn("Command {0} for {1} was running for more than {2} 
seconds. Terminated due to timeout.".format(commandType, component_name, 
self.status_command_timeout))
+self.execute_status_command(command)
   else:
 logger.error("Unrecognized command " + pprint.pformat(command))
 except Exception:

http://git-wip-us.apache.org/repos/asf/ambari/blob/af528b5c/ambari-agent/src/main/python/ambari_agent/PythonReflectiveExecutor.py
--
diff --git 

[06/12] ambari git commit: AMBARI-18626 UI doesn't show validation errors for removed properties. (ababiichuk)

2016-10-18 Thread jonathanhurley
AMBARI-18626 UI doesn't show validation errors for removed properties. 
(ababiichuk)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 61cc3a9e6100216ccb114d07a64619d9191f17cd
Parents: a93c0f4
Author: ababiichuk 
Authored: Tue Oct 18 15:43:13 2016 +0300
Committer: ababiichuk 
Committed: Tue Oct 18 15:43:13 2016 +0300

--
 ambari-web/app/mixins/common/serverValidator.js | 22 ++--
 .../test/mixins/common/serverValidator_test.js  | 18 +---
 2 files changed, 35 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/61cc3a9e/ambari-web/app/mixins/common/serverValidator.js
--
diff --git a/ambari-web/app/mixins/common/serverValidator.js 
b/ambari-web/app/mixins/common/serverValidator.js
index d8747d3..b251d84 100644
--- a/ambari-web/app/mixins/common/serverValidator.js
+++ b/ambari-web/app/mixins/common/serverValidator.js
@@ -183,7 +183,8 @@ App.ServerValidatorMixin = Em.Mixin.create({
 
 Em.assert('Unknown config error type ' + type, error.isError || 
error.isWarn || error.isGeneral);
 if (property) {
-  error.serviceName = App.StackService.find(Em.get(property, 
'serviceName')).get('displayName');
+  error.id = Em.get(property, 'id');
+  error.serviceName = Em.get(property, 'serviceDisplayName') || 
App.StackService.find(Em.get(property, 'serviceName')).get('displayName');
   error.propertyName = Em.get(property, 'name');
   error.filename = Em.get(property, 'filename');
   error.value = Em.get(property, 'value');
@@ -214,7 +215,9 @@ App.ServerValidatorMixin = Em.Mixin.create({
 } else {
   configErrorsMap[configId] = {
 type: item.level,
-messages: [item.message]
+messages: [item.message],
+name: item['config-name'],
+filename: item['config-type']
   }
 }
   } else {
@@ -261,6 +264,21 @@ App.ServerValidatorMixin = Em.Mixin.create({
   configErrorList.push(this.createErrorMessage(errorTypes.GENERAL, null, 
serverIssue.messages));
 }, this);
 
+Em.keys(configErrorsMap).forEach(function (id) {
+  if (!configErrorList.someProperty('id', id)) {
+var serverIssue = configErrorsMap[id],
+  filename = Em.get(serverIssue, 'filename'),
+  service = App.config.get('serviceByConfigTypeMap')[filename],
+  property = {
+id: id,
+name: Em.get(serverIssue, 'name'),
+filename: App.config.getOriginalFileName(filename),
+serviceDisplayName: service && Em.get(service, 'displayName')
+  };
+configErrorList.push(this.createErrorMessage(serverIssue.type, 
property, serverIssue.messages));
+  }
+}, this);
+
 return configErrorList;
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/61cc3a9e/ambari-web/test/mixins/common/serverValidator_test.js
--
diff --git a/ambari-web/test/mixins/common/serverValidator_test.js 
b/ambari-web/test/mixins/common/serverValidator_test.js
index 943eb57..cdd69fb 100644
--- a/ambari-web/test/mixins/common/serverValidator_test.js
+++ b/ambari-web/test/mixins/common/serverValidator_test.js
@@ -76,6 +76,10 @@ describe('App.ServerValidatorMixin', function () {
 'c4_f4': {
   type: 'ERROR',
   messages: ['error4']
+},
+'c5_f5': {
+  type: 'ERROR',
+  messages: ['error5']
 }
   },
   generalErrors: [{
@@ -116,10 +120,16 @@ describe('App.ServerValidatorMixin', function () {
   var error = result.find(function(r) { return r.propertyName === 'c4' && 
r.filename === 'f4'; });
   expect(error).to.be.undefined;
 });
+
+it('should add issues for deleted properties', function () {
+  var error = result.find(function(r) { return r.id === 'c5_f5'; });
+  expect(error.messages).to.eql(['error5']);
+});
   });
 
   describe('#createErrorMessage', function() {
 var property = {
+  id: 'p1_f1',
   name: 'p1',
   filename: 'f1',
   value: 'v1',
@@ -148,12 +158,13 @@ describe('App.ServerValidatorMixin', function () {
 filename: 'f1',
 value: 'v1',
 description: 'd1',
-serviceName: 'sName'
+serviceName: 'sName',
+id: 'p1_f1'
   });
 });
 
 it('creates error object', function() {
-  

[12/12] ambari git commit: Merge branch 'trunk' into branch-feature-AMBARI-18456

2016-10-18 Thread jonathanhurley
Merge branch 'trunk' into branch-feature-AMBARI-18456


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 532caef33fe65d6933e9797d3db1206bd69b
Parents: 2c60082 7ed5259
Author: Jonathan Hurley 
Authored: Tue Oct 18 15:32:08 2016 -0400
Committer: Jonathan Hurley 
Committed: Tue Oct 18 15:32:08 2016 -0400

--
 .../src/main/python/ambari_agent/ActionQueue.py |  26 +--
 .../main/python/ambari_commons/thread_utils.py  |  43 
 ambari-server/src/main/assemblies/server.xml|   4 +
 .../controller/ServiceComponentHostRequest.java |  10 +
 .../ServiceComponentHostResponse.java   |  19 +-
 .../internal/HostComponentResourceProvider.java |   9 +
 .../internal/JsonHttpPropertyRequest.java   |   6 +-
 .../controller/internal/URLStreamProvider.java  |   3 +
 .../internal/UpgradeResourceProvider.java   |   4 +-
 .../ambari/server/state/ConfigHelper.java   |  17 +-
 .../ambari/server/state/PropertyInfo.java   |  11 +
 .../state/PropertyStackUpgradeBehavior.java |  57 +
 .../server/state/ServiceComponentHost.java  |   6 +
 .../svccomphost/ServiceComponentHostImpl.java   |  10 +-
 .../src/main/resources/APACHE-AMBARI-MIB.txt| 206 ++
 .../src/main/resources/configuration-schema.xsd |   5 +
 .../src/main/resources/properties.json  |   1 +
 .../services/STORM/configuration/storm-site.xml |   1 +
 .../ClientConfigResourceProviderTest.java   |   6 +-
 .../HostComponentResourceProviderTest.java  |  10 +-
 .../internal/HostResourceProviderTest.java  |  26 +--
 .../StackUpgradeConfigurationMergeTest.java |   4 +-
 .../internal/UpgradeResourceProviderTest.java   |   6 +-
 .../ambari/server/state/ConfigHelperTest.java   | 210 +--
 .../app/controllers/global/update_controller.js |   3 +-
 .../main/admin/stack_and_upgrade_controller.js  |  22 +-
 ambari-web/app/controllers/wizard.js|  12 +-
 .../app/mappers/component_config_mapper.js  |   1 +
 ambari-web/app/mappers/hosts_mapper.js  |   2 +
 .../app/mappers/service_metrics_mapper.js   |   1 +
 ambari-web/app/mixins/common/serverValidator.js |  22 +-
 ambari-web/app/models/host_component.js |   1 +
 ambari-web/app/styles/config_history_flow.less  |  31 ++-
 .../common/configs/config_history_flow.hbs  |  32 +--
 .../service/info/summary/master_components.hbs  |   2 +-
 ambari-web/app/utils/ajax/ajax.js   |   2 +-
 .../views/common/configs/config_history_flow.js |   3 +-
 ambari-web/pom.xml  |  10 +-
 .../admin/stack_and_upgrade_controller_test.js  | 154 --
 .../test/mixins/common/serverValidator_test.js  |  18 +-
 contrib/alert-snmp-mib/APACHE-AMBARI-MIB.txt| 206 --
 contrib/alert-snmp-mib/README.md|   2 +-
 .../NIFI/1.0.0/package/scripts/params.py|   2 +-
 .../resources/stacks/HDF/2.0/repos/repoinfo.xml |  20 +-
 44 files changed, 841 insertions(+), 405 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/532caef3/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
--

http://git-wip-us.apache.org/repos/asf/ambari/blob/532caef3/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java
--

http://git-wip-us.apache.org/repos/asf/ambari/blob/532caef3/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
--
diff --cc 
ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
index 485329b,74eaa62..c1655aa
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
@@@ -1233,48 -1355,60 +1238,49 @@@ public class ServiceComponentHostImpl i
  
@Override
public ServiceComponentHostResponse convertToResponse(Map desiredConfigs) {
 -clusterGlobalLock.readLock().lock();
 -try {
 -  readLock.lock();
 -  try {
 -HostComponentStateEntity hostComponentStateEntity = getStateEntity();
 -if (null == hostComponentStateEntity) {
 -  LOG.warn("Could not convert ServiceComponentHostResponse to a 
response. It's possible 

[01/12] ambari git commit: AMBARI-18588 Ambari server should not crash with NPE when parsing HTTP response for YARN RM properties (dili)

2016-10-18 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-18456 2c6008293 -> 532caef33


AMBARI-18588 Ambari server should not crash with NPE when parsing HTTP response 
for YARN RM properties (dili)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 73f1dea9674359ecbfd723917c83913b20986906
Parents: 41c49e1
Author: Di Li 
Authored: Mon Oct 17 10:35:25 2016 -0400
Committer: Di Li 
Committed: Mon Oct 17 10:35:25 2016 -0400

--
 .../server/controller/internal/JsonHttpPropertyRequest.java| 6 --
 .../ambari/server/controller/internal/URLStreamProvider.java   | 3 +++
 2 files changed, 7 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/73f1dea9/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/JsonHttpPropertyRequest.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/JsonHttpPropertyRequest.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/JsonHttpPropertyRequest.java
index 6a93b4b..16a7ae7 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/JsonHttpPropertyRequest.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/JsonHttpPropertyRequest.java
@@ -62,7 +62,9 @@ public abstract class JsonHttpPropertyRequest extends 
HttpPropertyProvider.HttpP
 
 try {
   Map responseMap = 
GSON.fromJson(IOUtils.toString(inputStream, "UTF-8"), MAP_TYPE);
-
+  if (responseMap == null){
+LOG.error("Properties map from HTTP response is null");
+  }
   for (Map.Entry entry : getPropertyMappings().entrySet()) 
{
 Object propertyValueToSet = getPropertyValue(responseMap, 
entry.getKey());
 resource.setProperty(entry.getValue(), propertyValueToSet);
@@ -77,7 +79,7 @@ public abstract class JsonHttpPropertyRequest extends 
HttpPropertyProvider.HttpP
 
   // get the property value from the response map for the given property name
   private Object getPropertyValue(Map responseMap, String 
property) throws SystemException {
-if (property == null) {
+if (property == null || responseMap == null) {
   return null;
 }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/73f1dea9/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
index c176ceb..501aa04 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
@@ -241,6 +241,9 @@ public class URLStreamProvider implements StreamProvider {
 } else {
 // not a 401 Unauthorized status code
 // we would let the original response propagate
+if (statusCode == HttpStatus.SC_NOT_FOUND || statusCode == 
HttpStatus.SC_FORBIDDEN){
+  LOG.error(String.format("Received HTTP %s response from URL: %s", 
statusCode, spec));
+}
 return connection;
 }
   }



[09/12] ambari git commit: AMBARI-18629. HDFS goes down after installing cluster (aonishuk)

2016-10-18 Thread jonathanhurley
AMBARI-18629. HDFS goes down after installing cluster (aonishuk)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: e68cc10dd9e0c0c012aa684a69f743fee41310d5
Parents: ee2a125
Author: Andrew Onishuk 
Authored: Tue Oct 18 18:35:15 2016 +0300
Committer: Andrew Onishuk 
Committed: Tue Oct 18 18:35:15 2016 +0300

--
 .../src/main/python/ambari_agent/ActionQueue.py | 26 +---
 .../main/python/ambari_commons/thread_utils.py  | 43 
 2 files changed, 53 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e68cc10d/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py 
b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
index c03ee4f..5962d94 100644
--- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
+++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
@@ -36,6 +36,7 @@ from CommandStatusDict import CommandStatusDict
 from CustomServiceOrchestrator import CustomServiceOrchestrator
 from ambari_agent.BackgroundCommandExecutionHandle import 
BackgroundCommandExecutionHandle
 from ambari_commons.str_utils import split_on_chunks
+from ambari_commons.thread_utils import terminate_thread
 
 
 logger = logging.getLogger()
@@ -83,7 +84,6 @@ class ActionQueue(threading.Thread):
 self.controller = controller
 self.configTags = {}
 self._stop = threading.Event()
-self.hangingStatusCommands = {}
 self.tmpdir = config.get('agent', 'prefix')
 self.customServiceOrchestrator = CustomServiceOrchestrator(config, 
controller)
 self.parallel_execution = config.get_parallel_exec_option()
@@ -230,22 +230,16 @@ class ActionQueue(threading.Thread):
   elif commandType == self.STATUS_COMMAND:
 component_name = command['componentName']
 
-if component_name in self.hangingStatusCommands and not 
self.hangingStatusCommands[component_name].isAlive():
-  del self.hangingStatusCommands[component_name]
+thread = threading.Thread(target = self.execute_status_command, args = 
(command,))
+thread.daemon = True # hanging status commands should not be prevent 
ambari-agent from stopping
+thread.start()
+thread.join(timeout=self.status_command_timeout)
 
-if not component_name in self.hangingStatusCommands:
-  thread = threading.Thread(target = self.execute_status_command, args 
= (command,))
-  thread.daemon = True # hanging status commands should not be prevent 
ambari-agent from stopping
-  thread.start()
-  thread.join(timeout=self.status_command_timeout)
-
-  if thread.isAlive():
-# Force context to reset to normal. By context we mean sys.path, 
imports, logger setting, etc. They are set by specific status command, and are 
not relevant to ambari-agent.
-PythonReflectiveExecutor.last_context.revert()
-logger.warn("Command {0} for {1} is running for more than {2} 
seconds. Skipping it for current pack of status commands.".format(commandType, 
component_name, self.status_command_timeout))
-self.hangingStatusCommands[component_name] = thread
-else:
-  logger.info("Not running {0} for {1}, because previous one is still 
running.".format(commandType, component_name))
+if thread.isAlive():
+  terminate_thread(thread)
+  # Force context to reset to normal. By context we mean sys.path, 
imports, logger setting, etc. They are set by specific status command, and are 
not relevant to ambari-agent.
+  PythonReflectiveExecutor.last_context.revert()
+  logger.warn("Command {0} for {1} was running for more than {2} 
seconds. Terminated due to timeout.".format(commandType, component_name, 
self.status_command_timeout))
   else:
 logger.error("Unrecognized command " + pprint.pformat(command))
 except Exception:

http://git-wip-us.apache.org/repos/asf/ambari/blob/e68cc10d/ambari-common/src/main/python/ambari_commons/thread_utils.py
--
diff --git a/ambari-common/src/main/python/ambari_commons/thread_utils.py 
b/ambari-common/src/main/python/ambari_commons/thread_utils.py
new file mode 100644
index 000..952022c
--- /dev/null
+++ b/ambari-common/src/main/python/ambari_commons/thread_utils.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+
+'''
+Licensed to the Apache Software 

[11/12] ambari git commit: Analyze and Optimize Ambari Server Unit Tests - Group 4 (Commit 2) (avijayan)

2016-10-18 Thread jonathanhurley
Analyze and Optimize Ambari Server Unit Tests -  Group 4 (Commit 2) (avijayan)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 7ed5259d46ce0a0ace7b9d44d13fabe79b737346
Parents: 83aebda
Author: Aravindan Vijayan 
Authored: Tue Oct 18 09:44:11 2016 -0700
Committer: Aravindan Vijayan 
Committed: Tue Oct 18 09:44:18 2016 -0700

--
 .../ambari/server/state/ConfigHelperTest.java   | 211 +--
 1 file changed, 143 insertions(+), 68 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7ed5259d/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
index fd6ce1e..d014bde 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
@@ -43,6 +43,7 @@ import javax.persistence.EntityManager;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.actionmanager.RequestFactory;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
+import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.ClusterRequest;
@@ -115,10 +116,13 @@ public class ConfigHelperTest {
   Assert.assertNotNull(cluster);
   clusters.addHost("h1");
   clusters.addHost("h2");
+  clusters.addHost("h3");
   Assert.assertNotNull(clusters.getHost("h1"));
   Assert.assertNotNull(clusters.getHost("h2"));
+  Assert.assertNotNull(clusters.getHost("h3"));
   clusters.getHost("h1").persist();
   clusters.getHost("h2").persist();
+  clusters.getHost("h3").persist();
 
   // core-site
   ConfigurationRequest cr = new ConfigurationRequest();
@@ -185,57 +189,6 @@ public class ConfigHelperTest {
 add(clusterRequest3);
   }}, null);
 
-
-  //Another version of core-site & global.
-  // core-site2
-  ConfigurationRequest crr = new ConfigurationRequest();
-  crr.setClusterName(clusterName);
-  crr.setType("core-site2");
-  crr.setVersionTag("version1");
-  crr.setProperties(new HashMap() {{
-put("ipc.client.connect.max.retries", "30");
-put("fs.trash.interval", "30");
-  }});
-  crr.setPropertiesAttributes(new HashMap>() {{
-Map attrs = new HashMap();
-attrs.put("ipc.client.connect.max.retries", "1");
-attrs.put("fs.trash.interval", "2");
-put("attribute1", attrs);
-  }});
-
-  final ClusterRequest clusterRequestDup =
-new ClusterRequest(cluster.getClusterId(), clusterName,
-  cluster.getDesiredStackVersion().getStackVersion(), null);
-
-  clusterRequestDup.setDesiredConfig(Collections.singletonList(crr));
-  managementController.updateClusters(new HashSet() {{
-add(clusterRequestDup);
-  }}, null);
-
-  // global
-  crr.setType("global2");
-  crr.setVersionTag("version1");
-  crr.setProperties(new HashMap() {{
-put("dfs_namenode_name_dir", "/hadoop/hdfs/namenode");
-put("namenode_heapsize", "1024");
-  }});
-  crr.setPropertiesAttributes(new HashMap>() {{
-Map attrs = new HashMap();
-attrs.put("dfs_namenode_name_dir", "3");
-attrs.put("namenode_heapsize", "4");
-put("attribute2", attrs);
-  }});
-
-  final ClusterRequest clusterRequestGlobalDup =
-new ClusterRequest(cluster.getClusterId(), clusterName,
-  cluster.getDesiredStackVersion().getStackVersion(), null);
-
-  clusterRequestGlobalDup.setDesiredConfig(Collections.singletonList(crr));
-  managementController.updateClusters(new HashSet() {{
-add(clusterRequestGlobalDup);
-  }}, null);
-
-
   // oozie-site
   ConfigurationRequest cr4 = new ConfigurationRequest();
   cr4.setClusterName(clusterName);
@@ -265,7 +218,7 @@ public class ConfigHelperTest {
 put("timeline.service.operating.mode", "embedded");
 put("timeline.service.fifo.enabled", 

[03/12] ambari git commit: AMBARI-17636 Service Configs page: can't see all config versions in dropdown (Vivek Ratnavel Subramanian via zhewang)

2016-10-18 Thread jonathanhurley
AMBARI-17636 Service Configs page: can't see all config versions in dropdown 
(Vivek Ratnavel Subramanian via zhewang)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 89d964e0e0e5b6285d8207420720cd54888c
Parents: d132ca1
Author: Zhe (Joe) Wang 
Authored: Mon Oct 17 14:53:16 2016 -0700
Committer: Zhe (Joe) Wang 
Committed: Mon Oct 17 14:53:16 2016 -0700

--
 ambari-web/app/styles/config_history_flow.less  | 31 ++-
 .../common/configs/config_history_flow.hbs  | 32 
 .../views/common/configs/config_history_flow.js |  3 +-
 3 files changed, 44 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/89d964e0/ambari-web/app/styles/config_history_flow.less
--
diff --git a/ambari-web/app/styles/config_history_flow.less 
b/ambari-web/app/styles/config_history_flow.less
index e2806ea..e4bb599 100644
--- a/ambari-web/app/styles/config_history_flow.less
+++ b/ambari-web/app/styles/config_history_flow.less
@@ -230,21 +230,38 @@
 
 ul#dropdown_menu {
   position: absolute;
-  top: 0;
   left: 0;
   z-index: 1000;
-  float: left;
   min-width: 400px;
-  overflow: hidden;
-  overflow-y: scroll;
   padding: 5px 0;
-  margin: 5px 0;
+  margin: 0;
 }
 
 #dropdown_content {
+  overflow: hidden;
+  &::-webkit-scrollbar {
+display: none;
+  }
+}
+
+#dropdown_outer_container, #dropdown_menu_container {
+  min-width: 400px;
   height: 300px;
+}
+
+#dropdown_outer_container {
+  position: relative;
   overflow: hidden;
+}
+
+#dropdown_inner_container {
+  position: absolute;
+  left: 0;
+  overflow-x: hidden;
   overflow-y: scroll;
+  &::-webkit-scrollbar {
+display: none;
+  }
 }
 
 .dropdown-menu {
@@ -392,12 +409,12 @@
 }
 
 // Firefox specific styles
-body:not(:-moz-handler-blocked) {
+@-moz-document url-prefix() {
   #config_history_flow {
 .version-info-bar {
   .dropdown-menu {
 li {
-  line-height: 30px;
+  line-height: 30px !important;
 }
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/89d964e0/ambari-web/app/templates/common/configs/config_history_flow.hbs
--
diff --git a/ambari-web/app/templates/common/configs/config_history_flow.hbs 
b/ambari-web/app/templates/common/configs/config_history_flow.hbs
index 59d6491..99a65a2 100644
--- a/ambari-web/app/templates/common/configs/config_history_flow.hbs
+++ b/ambari-web/app/templates/common/configs/config_history_flow.hbs
@@ -82,20 +82,26 @@
 
   
   
-
-  {{#each serviceVersion in view.dropDownList}}
-{{view App.ConfigHistoryDropdownRowView 
serviceVersionBinding="serviceVersion"}}
-  {{/each}}
+
+  
+
+  
+{{#each serviceVersion in view.dropDownList}}
+  {{view App.ConfigHistoryDropdownRowView 
serviceVersionBinding="serviceVersion"}}
+{{/each}}
 
-  {{#unless view.showFullList}}
-
-  
-{{t 
dashboard.configHistory.info-bar.showMore}}{{view.displayName}}
-{{t 
dashboard.configHistory.title}}
-  
-
-  {{/unless}}
-
+{{#unless view.showFullList}}
+  
+
+  {{t 
dashboard.configHistory.info-bar.showMore}}{{view.displayName}}
+  {{t 
dashboard.configHistory.title}}
+
+  
+{{/unless}}
+  
+
+  
+
   
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/89d964e0/ambari-web/app/views/common/configs/config_history_flow.js
--
diff --git a/ambari-web/app/views/common/configs/config_history_flow.js 
b/ambari-web/app/views/common/configs/config_history_flow.js
index 0674231..58de1e6 100644
--- a/ambari-web/app/views/common/configs/config_history_flow.js
+++ b/ambari-web/app/views/common/configs/config_history_flow.js
@@ -591,6 +591,7 @@ App.ConfigHistoryDropdownRowView = 

[04/12] ambari git commit: AMBARI-18595 Icons don't display in Windows 10 Microsoft Edge or Internet Explorer 11 (Vivek Ratnavel Subramanian via zhewang)

2016-10-18 Thread jonathanhurley
AMBARI-18595 Icons don't display in Windows 10 Microsoft Edge or Internet 
Explorer 11 (Vivek Ratnavel Subramanian via zhewang)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: fdda172fed36ae3e156dc2757a09f85d0a379175
Parents: 89d964e
Author: Zhe (Joe) Wang 
Authored: Mon Oct 17 15:02:41 2016 -0700
Committer: Zhe (Joe) Wang 
Committed: Mon Oct 17 15:02:41 2016 -0700

--
 ambari-web/pom.xml | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fdda172f/ambari-web/pom.xml
--
diff --git a/ambari-web/pom.xml b/ambari-web/pom.xml
index 759b63e..d3de055 100644
--- a/ambari-web/pom.xml
+++ b/ambari-web/pom.xml
@@ -205,7 +205,7 @@
 1.7
 
   
-gzip ambari-web images
+gzip ambari-web images and fontawesome fonts
 prepare-package
 
   run
@@ -220,6 +220,14 @@
 
   
 
+
+  
+  
+
+  
+
+  
+
   
 
   



[08/12] ambari git commit: AMBARI-18627. Add service wizard hung at Choose services page as no ClusterStackVersion is available with state=CURRENT (alexantonenko)

2016-10-18 Thread jonathanhurley
AMBARI-18627. Add service wizard hung at Choose services page as no 
ClusterStackVersion is available with state=CURRENT (alexantonenko)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: ee2a12527864dd1238b18366badfec89465444b3
Parents: 3fc0b3e
Author: Alex Antonenko 
Authored: Tue Oct 18 17:00:16 2016 +0300
Committer: Alex Antonenko 
Committed: Tue Oct 18 18:03:24 2016 +0300

--
 .../main/admin/stack_and_upgrade_controller.js  |  22 ++-
 ambari-web/app/controllers/wizard.js|  12 +-
 ambari-web/app/utils/ajax/ajax.js   |   2 +-
 .../admin/stack_and_upgrade_controller_test.js  | 154 ---
 4 files changed, 156 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ee2a1252/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js 
b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index 01feb14..58344b2 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -678,7 +678,7 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
   },
   error: errorCallback
 });
-  },  
+  },
 
   /**
* error callback of abortUpgrade()
@@ -1430,7 +1430,7 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
   stackVersionNumber = App.get('currentStackVersion');
 return stackVersionNumber;
   },
-  
+
   /**
* perform validation if skip is  false and run save if
* validation successfull or run save without validation is skip 
is true
@@ -1447,7 +1447,7 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
   } else {
 var repoVersion = self.prepareRepoForSaving(repo);
 var stackVersionNumber = self.getStackVersionNumber(repo);
-
+
 App.ajax.send({
   name: 'admin.stack_versions.edit.repo',
   sender: this,
@@ -1464,7 +1464,7 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 });
 return deferred.promise();
   },
-  
+
   /**
* send request for validation for each repository
* @param {Em.Object} repo
@@ -1475,7 +1475,7 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 var deferred = $.Deferred(),
   totalCalls = 0,
   invalidUrls = [];
-
+
 if (skip) {
   deferred.resolve(invalidUrls);
 } else {
@@ -1903,10 +1903,16 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
* @param {object|null} jsonData
*/
   loadServiceVersionFromVersionDefinitionsSuccessCallback: function (jsonData) 
{
-var rv = jsonData.items[0].repository_versions[0].RepositoryVersions;
+var versions = Em.getWithDefault(jsonData, 'items', []);
+var currentVersion = versions.filterProperty('ClusterStackVersions.state', 
'CURRENT')[0];
+var rv = currentVersion || versions.filter(function(i) {
+  return i.ClusterStackVersions.stack === App.get('currentStackName') &&
+   i.ClusterStackVersions.version === App.get('currentStackVersionNumber');
+})[0];
 var map = this.get('serviceVersionsMap');
-if (rv) {
-  rv.stack_services.forEach(function (item) {
+var stackServices = Em.getWithDefault(rv || {}, 
'repository_versions.0.RepositoryVersions.stack_services', false);
+if (stackServices) {
+  stackServices.forEach(function (item) {
 map[item.name] = item.versions[0];
   });
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ee2a1252/ambari-web/app/controllers/wizard.js
--
diff --git a/ambari-web/app/controllers/wizard.js 
b/ambari-web/app/controllers/wizard.js
index e0df4fa..05cd35c 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -696,10 +696,16 @@ App.WizardController = 
Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
 
   serviceVersionsMap: {},
   loadServiceVersionFromVersionDefinitionsSuccessCallback: function (jsonData) 
{
-var rv = jsonData.items[0].repository_versions[0].RepositoryVersions;
+var versions = Em.getWithDefault(jsonData, 'items', []);
+var currentVersion = versions.filterProperty('ClusterStackVersions.state', 
'CURRENT')[0];
+

[05/12] ambari git commit: AMBARI-18621. Service Summary screen does not show hostname in tooltip pop-up for all services. (jaimin)

2016-10-18 Thread jonathanhurley
AMBARI-18621. Service Summary screen does not show hostname in tooltip pop-up 
for all services. (jaimin)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: a93c0f4004a02b02c95e2057115c961c192662b8
Parents: fdda172
Author: Jaimin Jetly 
Authored: Mon Oct 17 19:04:01 2016 -0700
Committer: Jaimin Jetly 
Committed: Mon Oct 17 19:08:31 2016 -0700

--
 .../controller/ServiceComponentHostRequest.java | 10 
 .../ServiceComponentHostResponse.java   | 19 +-
 .../internal/HostComponentResourceProvider.java |  9 +++
 .../server/state/ServiceComponentHost.java  |  6 +
 .../svccomphost/ServiceComponentHostImpl.java   |  9 ++-
 .../src/main/resources/properties.json  |  1 +
 .../ClientConfigResourceProviderTest.java   |  6 +++--
 .../HostComponentResourceProviderTest.java  | 10 
 .../internal/HostResourceProviderTest.java  | 26 ++--
 .../app/controllers/global/update_controller.js |  3 ++-
 .../app/mappers/component_config_mapper.js  |  1 +
 ambari-web/app/mappers/hosts_mapper.js  |  2 ++
 .../app/mappers/service_metrics_mapper.js   |  1 +
 ambari-web/app/models/host_component.js |  1 +
 .../service/info/summary/master_components.hbs  |  2 +-
 15 files changed, 82 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a93c0f40/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
index 4a07804..5b6c739 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
@@ -26,6 +26,7 @@ public class ServiceComponentHostRequest {
   private String serviceName;
   private String componentName;
   private String hostname;
+  private String publicHostname;
   private String state;
   private String desiredState; // CREATE/UPDATE
   private String desiredStackId; // UPDATE
@@ -178,6 +179,7 @@ public class ServiceComponentHostRequest {
   .append(", serviceName=").append(serviceName)
   .append(", componentName=").append(componentName)
   .append(", hostname=").append(hostname)
+  .append(", publicHostname=").append(publicHostname)
   .append(", desiredState=").append(desiredState)
   .append(", state=").append(state)
   .append(", desiredStackId=").append(desiredStackId)
@@ -201,4 +203,12 @@ public class ServiceComponentHostRequest {
   public String getMaintenanceState() {
 return maintenanceState;
   }
+
+  public String getPublicHostname() {
+return publicHostname;
+  }
+
+  public void setPublicHostname(String publicHostname) {
+this.publicHostname = publicHostname;
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/a93c0f40/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostResponse.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostResponse.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostResponse.java
index 85b2b46..f6993f8 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostResponse.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostResponse.java
@@ -30,6 +30,7 @@ public class ServiceComponentHostResponse {
   private String serviceName;
   private String componentName;
   private String displayName;
+  private String publicHostname;
   private String hostname;
   // type -> desired config
   private Map actualConfigs;
@@ -44,7 +45,8 @@ public class ServiceComponentHostResponse {
 
 
   public ServiceComponentHostResponse(String clusterName, String serviceName,
-  String componentName, String 
displayName, String hostname,
+  String componentName, String displayName,
+  String hostname, String publicHostname,
   String liveState, String stackVersion,
   

[10/12] ambari git commit: AMBARI-18611 Ambari MIB Should Be Included with Installation Bits (dsen)

2016-10-18 Thread jonathanhurley
AMBARI-18611 Ambari MIB Should Be Included with Installation Bits (dsen)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 83aebdaa577b526a8e123cfda53cea27d1138a1e
Parents: e68cc10
Author: Dmytro Sen 
Authored: Tue Oct 18 18:57:47 2016 +0300
Committer: Dmytro Sen 
Committed: Tue Oct 18 18:57:47 2016 +0300

--
 ambari-server/src/main/assemblies/server.xml|   4 +
 .../src/main/resources/APACHE-AMBARI-MIB.txt| 206 +++
 contrib/alert-snmp-mib/APACHE-AMBARI-MIB.txt| 206 ---
 contrib/alert-snmp-mib/README.md|   2 +-
 4 files changed, 211 insertions(+), 207 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/83aebdaa/ambari-server/src/main/assemblies/server.xml
--
diff --git a/ambari-server/src/main/assemblies/server.xml 
b/ambari-server/src/main/assemblies/server.xml
index 9252c56..11f940a 100644
--- a/ambari-server/src/main/assemblies/server.xml
+++ b/ambari-server/src/main/assemblies/server.xml
@@ -295,6 +295,10 @@
   /var/lib/ambari-server/resources
 
 
+  src/main/resources/APACHE-AMBARI-MIB.txt
+  /var/lib/ambari-server/resources
+
+
   src/main/resources/slider_resources/README.txt
   /var/lib/ambari-server/resources/apps
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/83aebdaa/ambari-server/src/main/resources/APACHE-AMBARI-MIB.txt
--
diff --git a/ambari-server/src/main/resources/APACHE-AMBARI-MIB.txt 
b/ambari-server/src/main/resources/APACHE-AMBARI-MIB.txt
new file mode 100644
index 000..85ec3cd
--- /dev/null
+++ b/ambari-server/src/main/resources/APACHE-AMBARI-MIB.txt
@@ -0,0 +1,206 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+-- 
+--  http://www.apache.org/licenses/LICENSE-2.0
+-- 
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+
+APACHE-AMBARI-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, Integer32, enterprises
+FROM SNMPv2-SMI
+MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
+FROM SNMPv2-CONF
+TEXTUAL-CONVENTION
+FROM SNMPv2-TC
+;
+
+apacheAmbari MODULE-IDENTITY
+LAST-UPDATED "20150831Z"
+ORGANIZATION "ambari.apache.org"
+CONTACT-INFO
+"email: u...@ambari.apache.org"
+DESCRIPTION
+"Apache Ambari MIB Module"
+-- Revisions
+REVISION "20150831Z"
+DESCRIPTION
+"First Apache Ambari MIB"
+::= { apache 16 }
+
+apache OBJECT IDENTIFIER ::= { enterprises 18060 }
+apacheAmbariTraps OBJECT IDENTIFIER ::= { apacheAmbari 0 }
+apacheAmbariAlerts OBJECT IDENTIFIER ::= { apacheAmbari 1 }
+
+AlertStateType ::= TEXTUAL-CONVENTION
+  STATUS current
+  DESCRIPTION
+"A string indicating the state of the Alert."
+  SYNTAX INTEGER {
+ok(0),
+unknown(1),
+warning(2),
+critical(3)
+  }
+
+apacheAmbariAlertTable OBJECT-TYPE 
+  SYNTAX  SEQUENCE OF AlertEntry
+  MAX-ACCESS  not-accessible
+  STATUS  current
+  DESCRIPTION
+"Table of Apache Ambari Alerts"
+  ::= { apacheAmbariAlerts 1 }
+
+AlertEntry ::= SEQUENCE {
+  alertDefinitionIdInteger32,
+  alertDefinitionName  OCTET STRING,
+  alertDefinitionHash  OCTET STRING,
+  alertNameOCTET STRING,
+  alertTextOCTET STRING,
+  alertState   AlertStateType,
+  alertHostOCTET STRING,
+  alertService OCTET STRING,
+  alertComponent   OCTET STRING  
+  }
+  
+apacheAmbariAlertEntry  OBJECT-TYPE
+  SYNTAX  AlertEntry
+  MAX-ACCESS  not-accessible
+  STATUS  current
+  DESCRIPTION
+"Each Alert Event"
+  INDEX { alertDefinitionId }
+  ::= { 

[02/12] ambari git commit: AMBARI-18613: Minor fixes for HDF mpack (jluniya)

2016-10-18 Thread jonathanhurley
AMBARI-18613: Minor fixes for HDF mpack (jluniya)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: d132ca17354b867cb167f8800e868a27f0b6252d
Parents: 73f1dea
Author: Jayush Luniya 
Authored: Mon Oct 17 13:06:51 2016 -0700
Committer: Jayush Luniya 
Committed: Mon Oct 17 13:06:51 2016 -0700

--
 .../NIFI/1.0.0/package/scripts/params.py|  2 +-
 .../resources/stacks/HDF/2.0/repos/repoinfo.xml | 20 ++--
 2 files changed, 11 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d132ca17/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/params.py
--
diff --git 
a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/params.py
 
b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/params.py
index 087cef4..def8f45 100644
--- 
a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/params.py
+++ 
b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/common-services/NIFI/1.0.0/package/scripts/params.py
@@ -350,7 +350,7 @@ if has_ranger_admin:
   nifi_authentication = 
config['configurations']['ranger-nifi-plugin-properties']['nifi.authentication']
   ranger_id_owner_for_certificate = 
config['configurations']['ranger-nifi-plugin-properties']['owner.for.certificate']
   nifi_id_owner_for_certificate = 
config['configurations']['ranger-nifi-policymgr-ssl']['owner.for.certificate']
-  regex = r"(CN)=([a-zA-Z0-9\.\-\* ]*)"
+  regex = r"(CN)=([a-zA-Z0-9\.\-\*\[\]\|\:]*)"
   match = re.search(regex, nifi_id_owner_for_certificate)
   common_name_for_certificate = match.group(2) if match else 'NONE'
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d132ca17/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/repos/repoinfo.xml
--
diff --git 
a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/repos/repoinfo.xml
 
b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/repos/repoinfo.xml
index 3f8fd9e..27cf047 100644
--- 
a/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/repos/repoinfo.xml
+++ 
b/contrib/management-packs/hdf-ambari-mpack/src/main/resources/stacks/HDF/2.0/repos/repoinfo.xml
@@ -16,10 +16,10 @@
limitations under the License.
 -->
 
-  
http://s3.amazonaws.com/dev.hortonworks.com/HDF/hdf_urlinfo.json
+  http://public-repo-1.hortonworks.com/HDF/hdf_urlinfo.json
   
 
-  
http://s3.amazonaws.com/dev.hortonworks.com/HDF/centos6/2.x/updates/2.0.0.0
+  
http://public-repo-1.hortonworks.com/HDF/centos6/2.x/updates/2.0.0.0
   HDF-2.0
   HDF
 
@@ -31,7 +31,7 @@
   
   
 
-  
http://s3.amazonaws.com/dev.hortonworks.com/HDF/centos7/2.x/updates/2.0.0.0
+  
http://public-repo-1.hortonworks.com/HDF/centos7/2.x/updates/2.0.0.0
   HDF-2.0
   HDF
 
@@ -43,7 +43,7 @@
   
   
 
-  
http://s3.amazonaws.com/dev.hortonworks.com/HDF/suse11sp3/2.x/updates/2.0.0.0
+  
http://public-repo-1.hortonworks.com/HDF/suse11sp3/2.x/updates/2.0.0.0
   HDF-2.0
   HDF
 
@@ -55,7 +55,7 @@
   
   
 
-  
http://s3.amazonaws.com/dev.hortonworks.com/HDF/suse11sp3/2.x/updates/2.0.0.0
+  
http://public-repo-1.hortonworks.com/HDF/suse11sp3/2.x/updates/2.0.0.0
   HDF-2.0
   HDF
 
@@ -67,7 +67,7 @@
   
   
 
-  
http://s3.amazonaws.com/dev.hortonworks.com/HDF/ubuntu12/2.x/updates/2.0.0.0
+  
http://public-repo-1.hortonworks.com/HDF/ubuntu12/2.x/updates/2.0.0.0
   HDF-2.0
   HDF
 
@@ -79,24 +79,24 @@
   
   
 
-  
http://s3.amazonaws.com/dev.hortonworks.com/HDF/debian7/2.x/updates/2.0.0.0
+  
http://public-repo-1.hortonworks.com/HDF/debian7/2.x/updates/2.0.0.0
   HDF-2.0
   HDF
 
 
-  
http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/debian6
+  
http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.21/repos/debian7
   HDP-UTILS-1.1.0.21
   HDP-UTILS
 
   
   
 
-  
http://s3.amazonaws.com/dev.hortonworks.com/HDF/ubuntu14/2.x/updates/2.0.0.0
+  
http://public-repo-1.hortonworks.com/HDF/ubuntu14/2.x/updates/2.0.0.0
   HDF-2.0
   HDF
 
 
-  

[07/12] ambari git commit: AMBARI-18609. Implement a way to configure Stack Upgrade Merger to skip particular properties to be merged from stack defaults (aonishuk)

2016-10-18 Thread jonathanhurley
AMBARI-18609. Implement a way to configure Stack Upgrade Merger to skip 
particular properties to be merged from stack defaults (aonishuk)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 3fc0b3e66b605bc628e9994be1c96c2c46396388
Parents: 61cc3a9
Author: Andrew Onishuk 
Authored: Tue Oct 18 17:54:51 2016 +0300
Committer: Andrew Onishuk 
Committed: Tue Oct 18 17:54:51 2016 +0300

--
 .../internal/UpgradeResourceProvider.java   |  4 +-
 .../ambari/server/state/ConfigHelper.java   | 17 +++---
 .../ambari/server/state/PropertyInfo.java   | 11 
 .../state/PropertyStackUpgradeBehavior.java | 57 
 .../src/main/resources/configuration-schema.xsd |  5 ++
 .../services/STORM/configuration/storm-site.xml |  1 +
 .../StackUpgradeConfigurationMergeTest.java |  4 +-
 .../internal/UpgradeResourceProviderTest.java   |  6 +--
 8 files changed, 91 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3fc0b3e6/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index d37e32b..7b7a7a3 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -,10 +,10 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
   // used when determining if a property has been customized and should be
   // overriden with the new stack value)
   Map> oldStackDefaultConfigurationsByType = 
configHelper.getDefaultProperties(
-  currentStackId, cluster);
+  currentStackId, cluster, true);
 
   // populate a map with default configurations from the new stack
-  newConfigurationsByType = 
configHelper.getDefaultProperties(targetStackId, cluster);
+  newConfigurationsByType = 
configHelper.getDefaultProperties(targetStackId, cluster, true);
 
   // We want to skip updating config-types of services that are not in the 
upgrade pack.
   // Care should be taken as some config-types could be in services that 
are in and out

http://git-wip-us.apache.org/repos/asf/ambari/blob/3fc0b3e6/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
index 70c24f9..197ffdd 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
@@ -944,11 +944,12 @@ public class ConfigHelper {
* @param cluster
*  the cluster to use when determining which services default
*  configurations to include (not {@code null}).
+   * @param onStackUpgradeFilter if true skip {@code } properties
* @return a mapping of configuration type to map of key/value pairs for the
* default configurations.
* @throws AmbariException
*/
-  public Map> getDefaultProperties(StackId stack, 
Cluster cluster)
+  public Map> getDefaultProperties(StackId stack, 
Cluster cluster, boolean onStackUpgradeFilter)
   throws AmbariException {
 Map> defaultPropertiesByType = new 
HashMap>();
 
@@ -962,9 +963,10 @@ public class ConfigHelper {
   if (!defaultPropertiesByType.containsKey(type)) {
 defaultPropertiesByType.put(type, new HashMap());
   }
-
-  defaultPropertiesByType.get(type).put(stackDefaultProperty.getName(),
-  stackDefaultProperty.getValue());
+  if (!onStackUpgradeFilter || 
stackDefaultProperty.getPropertyStackUpgradeBehavior().isMerge()) {
+defaultPropertiesByType.get(type).put(stackDefaultProperty.getName(),
+stackDefaultProperty.getValue());
+  }
 }
 
 // for every installed service, populate the default service properties
@@ -979,9 +981,10 @@ 

[1/2] ambari git commit: AMBARI-18614 - Remove Unnecessary Locks Inside Of SCH Business Object Implementations (jonathanhurley)

2016-10-18 Thread jonathanhurley
Repository: ambari
Updated Branches:
  refs/heads/branch-feature-AMBARI-18456 aa29f56cb -> 2c6008293


http://git-wip-us.apache.org/repos/asf/ambari/blob/2c600829/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index 7b3f671..c06debb 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@ -2523,8 +2523,6 @@ public class AmbariManagementControllerTest {
 sch1.setDesiredStackVersion(new StackId("HDP-1.2.0"));
 sch1.setStackVersion(new StackId("HDP-0.1"));
 
-sch1.persist();
-
 sch1.updateActualConfigs(new HashMap>() {{
   put("global", new HashMap() {{ put("tag", "version1"); 
}});
 }});
@@ -2958,13 +2956,6 @@ public class AmbariManagementControllerTest {
 sch4.setDesiredState(State.INSTALLED);
 sch5.setDesiredState(State.UNINSTALLED);
 
-sch1.persist();
-sch2.persist();
-sch3.persist();
-sch4.persist();
-sch5.persist();
-sch6.persist();
-
 ServiceComponentHostRequest r =
 new ServiceComponentHostRequest(null, null, null, null, null);
 
@@ -3959,9 +3950,7 @@ public class AmbariManagementControllerTest {
 Assert.assertEquals("testServiceComponentHostUpdateStackId", 
stages.get(0).getRequestContext());
 Assert.assertEquals(State.UPGRADING, sch1.getState());
 Assert.assertEquals(State.UPGRADING, sch2.getState());
-sch1.refresh();
 Assert.assertTrue(sch1.getDesiredStackVersion().compareTo(newStack) == 0);
-sch2.refresh();
 Assert.assertTrue(sch2.getDesiredStackVersion().compareTo(newStack) == 0);
 for (HostRoleCommand command : stages.get(0).getOrderedHostRoleCommands()) 
{
   ExecutionCommand execCommand = 
command.getExecutionCommandWrapper().getExecutionCommand();
@@ -4005,11 +3994,8 @@ public class AmbariManagementControllerTest {
 Assert.assertEquals(State.UPGRADING, sch1.getState());
 Assert.assertEquals(State.UPGRADING, sch2.getState());
 Assert.assertEquals(State.UPGRADING, sch3.getState());
-sch1.refresh();
 Assert.assertTrue(sch1.getDesiredStackVersion().compareTo(newStack) == 0);
-sch2.refresh();
 Assert.assertTrue(sch2.getDesiredStackVersion().compareTo(newStack) == 0);
-sch3.refresh();
 Assert.assertTrue(sch3.getDesiredStackVersion().compareTo(newStack) == 0);
 for (Stage stage : stages) {
   for (HostRoleCommand command : stage.getOrderedHostRoleCommands()) {
@@ -4248,10 +4234,10 @@ public class AmbariManagementControllerTest {
 
 mapred.addServiceComponent(Role.RESOURCEMANAGER.name());
 
-
hdfs.getServiceComponent(Role.HDFS_CLIENT.name()).addServiceComponentHost(host1).persist();
-
hdfs.getServiceComponent(Role.NAMENODE.name()).addServiceComponentHost(host1).persist();
-
hdfs.getServiceComponent(Role.DATANODE.name()).addServiceComponentHost(host1).persist();
-
hdfs.getServiceComponent(Role.DATANODE.name()).addServiceComponentHost(host2).persist();
+
hdfs.getServiceComponent(Role.HDFS_CLIENT.name()).addServiceComponentHost(host1);
+
hdfs.getServiceComponent(Role.NAMENODE.name()).addServiceComponentHost(host1);
+
hdfs.getServiceComponent(Role.DATANODE.name()).addServiceComponentHost(host1);
+
hdfs.getServiceComponent(Role.DATANODE.name()).addServiceComponentHost(host2);
 
 String actionDef1 = getUniqueName();
 String actionDef2 = getUniqueName();
@@ -4411,9 +4397,9 @@ public class AmbariManagementControllerTest {
 hdfs.addServiceComponent(Role.NAMENODE.name());
 hdfs.addServiceComponent(Role.DATANODE.name());
 
-
hdfs.getServiceComponent(Role.HDFS_CLIENT.name()).addServiceComponentHost(host1).persist();
-
hdfs.getServiceComponent(Role.NAMENODE.name()).addServiceComponentHost(host1).persist();
-
hdfs.getServiceComponent(Role.DATANODE.name()).addServiceComponentHost(host1).persist();
+
hdfs.getServiceComponent(Role.HDFS_CLIENT.name()).addServiceComponentHost(host1);
+
hdfs.getServiceComponent(Role.NAMENODE.name()).addServiceComponentHost(host1);
+
hdfs.getServiceComponent(Role.DATANODE.name()).addServiceComponentHost(host1);
 
 installService(cluster1, "HDFS", false, false);
 
@@ -4523,9 +4509,9 @@ public class AmbariManagementControllerTest {
 
 hive.addServiceComponent(Role.HIVE_SERVER.name());
 
-
hdfs.getServiceComponent(Role.HDFS_CLIENT.name()).addServiceComponentHost(host1).persist();
-
hdfs.getServiceComponent(Role.NAMENODE.name()).addServiceComponentHost(host1).persist();
-

[2/2] ambari git commit: AMBARI-18614 - Remove Unnecessary Locks Inside Of SCH Business Object Implementations (jonathanhurley)

2016-10-18 Thread jonathanhurley
AMBARI-18614 - Remove Unnecessary Locks Inside Of SCH Business Object 
Implementations (jonathanhurley)


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

Branch: refs/heads/branch-feature-AMBARI-18456
Commit: 2c6008293a664ab3b0f24a3f22be54fe0e5f1faf
Parents: aa29f56
Author: Jonathan Hurley 
Authored: Tue Oct 18 08:21:08 2016 -0400
Committer: Jonathan Hurley 
Committed: Tue Oct 18 08:21:08 2016 -0400

--
 .../apache/ambari/server/state/HostConfig.java  |  12 +-
 .../server/state/ServiceComponentHost.java  |   6 -
 .../server/state/cluster/ClusterImpl.java   |   9 +-
 .../svccomphost/ServiceComponentHostImpl.java   | 968 +++
 .../server/agent/HeartbeatProcessorTest.java|  54 +-
 .../server/agent/TestHeartbeatHandler.java  |  46 +-
 .../server/agent/TestHeartbeatMonitor.java  |  34 +-
 .../configuration/RecoveryConfigHelperTest.java |  22 +-
 .../AmbariManagementControllerTest.java |  56 +-
 .../apache/ambari/server/events/EventsTest.java |   2 -
 .../apache/ambari/server/orm/OrmTestHelper.java |   7 -
 .../ComponentVersionCheckActionTest.java|   1 -
 .../upgrades/UpgradeActionTest.java |   2 -
 .../server/state/ServiceComponentTest.java  |  29 +-
 .../state/cluster/ClusterDeadlockTest.java  |   1 -
 .../server/state/cluster/ClusterImplTest.java   |  14 +-
 .../server/state/cluster/ClusterTest.java   |  37 -
 .../state/cluster/ClustersDeadlockTest.java |   1 -
 .../server/state/cluster/ClustersTest.java  |   3 -
 .../ConcurrentServiceConfigVersionTest.java |   1 -
 ...omponentHostConcurrentWriteDeadlockTest.java |   1 -
 .../svccomphost/ServiceComponentHostTest.java   |   2 -
 22 files changed, 467 insertions(+), 841 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2c600829/ambari-server/src/main/java/org/apache/ambari/server/state/HostConfig.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/HostConfig.java 
b/ambari-server/src/main/java/org/apache/ambari/server/state/HostConfig.java
index fc22ba5..3e767e1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/HostConfig.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/HostConfig.java
@@ -17,12 +17,13 @@
  */
 package org.apache.ambari.server.state;
 
-import com.google.common.base.Objects;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
-import java.util.HashMap;
-import java.util.Map;
+import com.google.common.base.Objects;
 
 /**
  * Data structure that hangs off of the Host and points to what tags are
@@ -30,7 +31,7 @@ import java.util.Map;
  */
 
 public class HostConfig {
-  private final Map configGroupOverrides = new HashMap();
+  private final Map configGroupOverrides = new 
ConcurrentHashMap();
   private String defaultVersionTag;
 
   public HostConfig() {
@@ -67,8 +68,9 @@ public class HostConfig {
   sb.append(", overrides = [ ");
   int i = 0;
   for (Map.Entry entry : configGroupOverrides.entrySet()) {
-if (i++ != 0)
+if (i++ != 0) {
   sb.append(", ");
+}
 sb.append(entry.getKey().toString() + " : " + entry.getValue());
   }
   sb.append("]");

http://git-wip-us.apache.org/repos/asf/ambari/blob/2c600829/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java
index 586134c..e76ebf7 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java
@@ -182,12 +182,6 @@ public interface ServiceComponentHost {
*/
   ServiceComponentHostResponse convertToResponse(Map 
desiredConfigs);
 
-  boolean isPersisted();
-
-  void persist();
-
-  void refresh();
-
   void debugDump(StringBuilder sb);
 
   boolean canBeRemoved();

http://git-wip-us.apache.org/repos/asf/ambari/blob/2c600829/ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java

ambari git commit: Analyze and Optimize Ambari Server Unit Tests - Group 4 (Commit 2) (avijayan)

2016-10-18 Thread avijayan
Repository: ambari
Updated Branches:
  refs/heads/trunk 83aebdaa5 -> 7ed5259d4


Analyze and Optimize Ambari Server Unit Tests -  Group 4 (Commit 2) (avijayan)


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

Branch: refs/heads/trunk
Commit: 7ed5259d46ce0a0ace7b9d44d13fabe79b737346
Parents: 83aebda
Author: Aravindan Vijayan 
Authored: Tue Oct 18 09:44:11 2016 -0700
Committer: Aravindan Vijayan 
Committed: Tue Oct 18 09:44:18 2016 -0700

--
 .../ambari/server/state/ConfigHelperTest.java   | 211 +--
 1 file changed, 143 insertions(+), 68 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7ed5259d/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
index fd6ce1e..d014bde 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
@@ -43,6 +43,7 @@ import javax.persistence.EntityManager;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.actionmanager.RequestFactory;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
+import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.ClusterRequest;
@@ -115,10 +116,13 @@ public class ConfigHelperTest {
   Assert.assertNotNull(cluster);
   clusters.addHost("h1");
   clusters.addHost("h2");
+  clusters.addHost("h3");
   Assert.assertNotNull(clusters.getHost("h1"));
   Assert.assertNotNull(clusters.getHost("h2"));
+  Assert.assertNotNull(clusters.getHost("h3"));
   clusters.getHost("h1").persist();
   clusters.getHost("h2").persist();
+  clusters.getHost("h3").persist();
 
   // core-site
   ConfigurationRequest cr = new ConfigurationRequest();
@@ -185,57 +189,6 @@ public class ConfigHelperTest {
 add(clusterRequest3);
   }}, null);
 
-
-  //Another version of core-site & global.
-  // core-site2
-  ConfigurationRequest crr = new ConfigurationRequest();
-  crr.setClusterName(clusterName);
-  crr.setType("core-site2");
-  crr.setVersionTag("version1");
-  crr.setProperties(new HashMap() {{
-put("ipc.client.connect.max.retries", "30");
-put("fs.trash.interval", "30");
-  }});
-  crr.setPropertiesAttributes(new HashMap>() {{
-Map attrs = new HashMap();
-attrs.put("ipc.client.connect.max.retries", "1");
-attrs.put("fs.trash.interval", "2");
-put("attribute1", attrs);
-  }});
-
-  final ClusterRequest clusterRequestDup =
-new ClusterRequest(cluster.getClusterId(), clusterName,
-  cluster.getDesiredStackVersion().getStackVersion(), null);
-
-  clusterRequestDup.setDesiredConfig(Collections.singletonList(crr));
-  managementController.updateClusters(new HashSet() {{
-add(clusterRequestDup);
-  }}, null);
-
-  // global
-  crr.setType("global2");
-  crr.setVersionTag("version1");
-  crr.setProperties(new HashMap() {{
-put("dfs_namenode_name_dir", "/hadoop/hdfs/namenode");
-put("namenode_heapsize", "1024");
-  }});
-  crr.setPropertiesAttributes(new HashMap>() {{
-Map attrs = new HashMap();
-attrs.put("dfs_namenode_name_dir", "3");
-attrs.put("namenode_heapsize", "4");
-put("attribute2", attrs);
-  }});
-
-  final ClusterRequest clusterRequestGlobalDup =
-new ClusterRequest(cluster.getClusterId(), clusterName,
-  cluster.getDesiredStackVersion().getStackVersion(), null);
-
-  clusterRequestGlobalDup.setDesiredConfig(Collections.singletonList(crr));
-  managementController.updateClusters(new HashSet() {{
-add(clusterRequestGlobalDup);
-  }}, null);
-
-
   // oozie-site
   ConfigurationRequest cr4 = new ConfigurationRequest();
   cr4.setClusterName(clusterName);
@@ -265,7 +218,7 @@ public class ConfigHelperTest {
 put("timeline.service.operating.mode", 

ambari git commit: Analyze and Optimize Ambari Server Unit Tests - Group 4 (Commit 2) (avijayan)

2016-10-18 Thread avijayan
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 4302ef9ca -> 8564be100


Analyze and Optimize Ambari Server Unit Tests -  Group 4 (Commit 2) (avijayan)


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

Branch: refs/heads/branch-2.5
Commit: 8564be1005bb291354539874d511313be62e0015
Parents: 4302ef9
Author: Aravindan Vijayan 
Authored: Tue Oct 18 09:42:26 2016 -0700
Committer: Aravindan Vijayan 
Committed: Tue Oct 18 09:42:26 2016 -0700

--
 .../ambari/server/state/ConfigHelperTest.java   | 211 +--
 1 file changed, 143 insertions(+), 68 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8564be10/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
index fd6ce1e..d014bde 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/state/ConfigHelperTest.java
@@ -43,6 +43,7 @@ import javax.persistence.EntityManager;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.actionmanager.RequestFactory;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
+import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.ClusterRequest;
@@ -115,10 +116,13 @@ public class ConfigHelperTest {
   Assert.assertNotNull(cluster);
   clusters.addHost("h1");
   clusters.addHost("h2");
+  clusters.addHost("h3");
   Assert.assertNotNull(clusters.getHost("h1"));
   Assert.assertNotNull(clusters.getHost("h2"));
+  Assert.assertNotNull(clusters.getHost("h3"));
   clusters.getHost("h1").persist();
   clusters.getHost("h2").persist();
+  clusters.getHost("h3").persist();
 
   // core-site
   ConfigurationRequest cr = new ConfigurationRequest();
@@ -185,57 +189,6 @@ public class ConfigHelperTest {
 add(clusterRequest3);
   }}, null);
 
-
-  //Another version of core-site & global.
-  // core-site2
-  ConfigurationRequest crr = new ConfigurationRequest();
-  crr.setClusterName(clusterName);
-  crr.setType("core-site2");
-  crr.setVersionTag("version1");
-  crr.setProperties(new HashMap() {{
-put("ipc.client.connect.max.retries", "30");
-put("fs.trash.interval", "30");
-  }});
-  crr.setPropertiesAttributes(new HashMap>() {{
-Map attrs = new HashMap();
-attrs.put("ipc.client.connect.max.retries", "1");
-attrs.put("fs.trash.interval", "2");
-put("attribute1", attrs);
-  }});
-
-  final ClusterRequest clusterRequestDup =
-new ClusterRequest(cluster.getClusterId(), clusterName,
-  cluster.getDesiredStackVersion().getStackVersion(), null);
-
-  clusterRequestDup.setDesiredConfig(Collections.singletonList(crr));
-  managementController.updateClusters(new HashSet() {{
-add(clusterRequestDup);
-  }}, null);
-
-  // global
-  crr.setType("global2");
-  crr.setVersionTag("version1");
-  crr.setProperties(new HashMap() {{
-put("dfs_namenode_name_dir", "/hadoop/hdfs/namenode");
-put("namenode_heapsize", "1024");
-  }});
-  crr.setPropertiesAttributes(new HashMap>() {{
-Map attrs = new HashMap();
-attrs.put("dfs_namenode_name_dir", "3");
-attrs.put("namenode_heapsize", "4");
-put("attribute2", attrs);
-  }});
-
-  final ClusterRequest clusterRequestGlobalDup =
-new ClusterRequest(cluster.getClusterId(), clusterName,
-  cluster.getDesiredStackVersion().getStackVersion(), null);
-
-  clusterRequestGlobalDup.setDesiredConfig(Collections.singletonList(crr));
-  managementController.updateClusters(new HashSet() {{
-add(clusterRequestGlobalDup);
-  }}, null);
-
-
   // oozie-site
   ConfigurationRequest cr4 = new ConfigurationRequest();
   cr4.setClusterName(clusterName);
@@ -265,7 +218,7 @@ public class ConfigHelperTest {
 

ambari git commit: AMBARI-18611 Ambari MIB Should Be Included with Installation Bits (dsen)

2016-10-18 Thread dsen
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 d3a3dd5c2 -> 4302ef9ca


AMBARI-18611 Ambari MIB Should Be Included with Installation Bits (dsen)


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

Branch: refs/heads/branch-2.5
Commit: 4302ef9ca47161a3431bcf519cd89e6ec93c77c5
Parents: d3a3dd5
Author: Dmytro Sen 
Authored: Tue Oct 18 18:57:47 2016 +0300
Committer: Dmytro Sen 
Committed: Tue Oct 18 19:10:20 2016 +0300

--
 ambari-server/src/main/assemblies/server.xml|   4 +
 .../src/main/resources/APACHE-AMBARI-MIB.txt| 206 +++
 contrib/alert-snmp-mib/APACHE-AMBARI-MIB.txt| 206 ---
 contrib/alert-snmp-mib/README.md|   2 +-
 4 files changed, 211 insertions(+), 207 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4302ef9c/ambari-server/src/main/assemblies/server.xml
--
diff --git a/ambari-server/src/main/assemblies/server.xml 
b/ambari-server/src/main/assemblies/server.xml
index 1560d8d..b6e0723 100644
--- a/ambari-server/src/main/assemblies/server.xml
+++ b/ambari-server/src/main/assemblies/server.xml
@@ -295,6 +295,10 @@
   /var/lib/ambari-server/resources
 
 
+  src/main/resources/APACHE-AMBARI-MIB.txt
+  /var/lib/ambari-server/resources
+
+
   src/main/resources/slider_resources/README.txt
   /var/lib/ambari-server/resources/apps
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/4302ef9c/ambari-server/src/main/resources/APACHE-AMBARI-MIB.txt
--
diff --git a/ambari-server/src/main/resources/APACHE-AMBARI-MIB.txt 
b/ambari-server/src/main/resources/APACHE-AMBARI-MIB.txt
new file mode 100644
index 000..85ec3cd
--- /dev/null
+++ b/ambari-server/src/main/resources/APACHE-AMBARI-MIB.txt
@@ -0,0 +1,206 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+-- 
+--  http://www.apache.org/licenses/LICENSE-2.0
+-- 
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+
+
+APACHE-AMBARI-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, Integer32, enterprises
+FROM SNMPv2-SMI
+MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
+FROM SNMPv2-CONF
+TEXTUAL-CONVENTION
+FROM SNMPv2-TC
+;
+
+apacheAmbari MODULE-IDENTITY
+LAST-UPDATED "20150831Z"
+ORGANIZATION "ambari.apache.org"
+CONTACT-INFO
+"email: u...@ambari.apache.org"
+DESCRIPTION
+"Apache Ambari MIB Module"
+-- Revisions
+REVISION "20150831Z"
+DESCRIPTION
+"First Apache Ambari MIB"
+::= { apache 16 }
+
+apache OBJECT IDENTIFIER ::= { enterprises 18060 }
+apacheAmbariTraps OBJECT IDENTIFIER ::= { apacheAmbari 0 }
+apacheAmbariAlerts OBJECT IDENTIFIER ::= { apacheAmbari 1 }
+
+AlertStateType ::= TEXTUAL-CONVENTION
+  STATUS current
+  DESCRIPTION
+"A string indicating the state of the Alert."
+  SYNTAX INTEGER {
+ok(0),
+unknown(1),
+warning(2),
+critical(3)
+  }
+
+apacheAmbariAlertTable OBJECT-TYPE 
+  SYNTAX  SEQUENCE OF AlertEntry
+  MAX-ACCESS  not-accessible
+  STATUS  current
+  DESCRIPTION
+"Table of Apache Ambari Alerts"
+  ::= { apacheAmbariAlerts 1 }
+
+AlertEntry ::= SEQUENCE {
+  alertDefinitionIdInteger32,
+  alertDefinitionName  OCTET STRING,
+  alertDefinitionHash  OCTET STRING,
+  alertNameOCTET STRING,
+  alertTextOCTET STRING,
+  alertState   AlertStateType,
+  alertHostOCTET STRING,
+  alertService OCTET STRING,
+  alertComponent   OCTET STRING  
+  }
+  
+apacheAmbariAlertEntry  OBJECT-TYPE
+  SYNTAX  AlertEntry
+  MAX-ACCESS  not-accessible
+  STATUS  current
+  DESCRIPTION
+   

[3/3] ambari git commit: AMBARI-18629. HDFS goes down after installing cluster (aonishuk)

2016-10-18 Thread aonishuk
AMBARI-18629. HDFS goes down after installing cluster (aonishuk)


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

Branch: refs/heads/branch-2.5
Commit: d3a3dd5c26dfe2b70c228467e11df05a3d8d5558
Parents: be3a65d
Author: Andrew Onishuk 
Authored: Tue Oct 18 18:35:20 2016 +0300
Committer: Andrew Onishuk 
Committed: Tue Oct 18 18:35:20 2016 +0300

--
 .../src/main/python/ambari_agent/ActionQueue.py | 26 +---
 .../main/python/ambari_commons/thread_utils.py  | 43 
 2 files changed, 53 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d3a3dd5c/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py 
b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
index c03ee4f..5962d94 100644
--- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
+++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
@@ -36,6 +36,7 @@ from CommandStatusDict import CommandStatusDict
 from CustomServiceOrchestrator import CustomServiceOrchestrator
 from ambari_agent.BackgroundCommandExecutionHandle import 
BackgroundCommandExecutionHandle
 from ambari_commons.str_utils import split_on_chunks
+from ambari_commons.thread_utils import terminate_thread
 
 
 logger = logging.getLogger()
@@ -83,7 +84,6 @@ class ActionQueue(threading.Thread):
 self.controller = controller
 self.configTags = {}
 self._stop = threading.Event()
-self.hangingStatusCommands = {}
 self.tmpdir = config.get('agent', 'prefix')
 self.customServiceOrchestrator = CustomServiceOrchestrator(config, 
controller)
 self.parallel_execution = config.get_parallel_exec_option()
@@ -230,22 +230,16 @@ class ActionQueue(threading.Thread):
   elif commandType == self.STATUS_COMMAND:
 component_name = command['componentName']
 
-if component_name in self.hangingStatusCommands and not 
self.hangingStatusCommands[component_name].isAlive():
-  del self.hangingStatusCommands[component_name]
+thread = threading.Thread(target = self.execute_status_command, args = 
(command,))
+thread.daemon = True # hanging status commands should not be prevent 
ambari-agent from stopping
+thread.start()
+thread.join(timeout=self.status_command_timeout)
 
-if not component_name in self.hangingStatusCommands:
-  thread = threading.Thread(target = self.execute_status_command, args 
= (command,))
-  thread.daemon = True # hanging status commands should not be prevent 
ambari-agent from stopping
-  thread.start()
-  thread.join(timeout=self.status_command_timeout)
-
-  if thread.isAlive():
-# Force context to reset to normal. By context we mean sys.path, 
imports, logger setting, etc. They are set by specific status command, and are 
not relevant to ambari-agent.
-PythonReflectiveExecutor.last_context.revert()
-logger.warn("Command {0} for {1} is running for more than {2} 
seconds. Skipping it for current pack of status commands.".format(commandType, 
component_name, self.status_command_timeout))
-self.hangingStatusCommands[component_name] = thread
-else:
-  logger.info("Not running {0} for {1}, because previous one is still 
running.".format(commandType, component_name))
+if thread.isAlive():
+  terminate_thread(thread)
+  # Force context to reset to normal. By context we mean sys.path, 
imports, logger setting, etc. They are set by specific status command, and are 
not relevant to ambari-agent.
+  PythonReflectiveExecutor.last_context.revert()
+  logger.warn("Command {0} for {1} was running for more than {2} 
seconds. Terminated due to timeout.".format(commandType, component_name, 
self.status_command_timeout))
   else:
 logger.error("Unrecognized command " + pprint.pformat(command))
 except Exception:

http://git-wip-us.apache.org/repos/asf/ambari/blob/d3a3dd5c/ambari-common/src/main/python/ambari_commons/thread_utils.py
--
diff --git a/ambari-common/src/main/python/ambari_commons/thread_utils.py 
b/ambari-common/src/main/python/ambari_commons/thread_utils.py
new file mode 100644
index 000..952022c
--- /dev/null
+++ b/ambari-common/src/main/python/ambari_commons/thread_utils.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+
+'''
+Licensed to the Apache Software Foundation (ASF) 

[2/3] ambari git commit: AMBARI-18629. HDFS goes down after installing cluster (aonishuk)

2016-10-18 Thread aonishuk
AMBARI-18629. HDFS goes down after installing cluster (aonishuk)


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

Branch: refs/heads/branch-2.4
Commit: 9332b381b451548375b0eae407b6eb8bcb6c84ce
Parents: 33c347b
Author: Andrew Onishuk 
Authored: Tue Oct 18 18:35:17 2016 +0300
Committer: Andrew Onishuk 
Committed: Tue Oct 18 18:35:17 2016 +0300

--
 .../src/main/python/ambari_agent/ActionQueue.py | 26 +---
 .../main/python/ambari_commons/thread_utils.py  | 43 
 2 files changed, 53 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/9332b381/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
--
diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py 
b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
index 198ae03..dedef76 100644
--- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
+++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
@@ -36,6 +36,7 @@ from CommandStatusDict import CommandStatusDict
 from CustomServiceOrchestrator import CustomServiceOrchestrator
 from ambari_agent.BackgroundCommandExecutionHandle import 
BackgroundCommandExecutionHandle
 from ambari_commons.str_utils import split_on_chunks
+from ambari_commons.thread_utils import terminate_thread
 
 
 logger = logging.getLogger()
@@ -82,7 +83,6 @@ class ActionQueue(threading.Thread):
 self.controller = controller
 self.configTags = {}
 self._stop = threading.Event()
-self.hangingStatusCommands = {}
 self.tmpdir = config.get('agent', 'prefix')
 self.customServiceOrchestrator = CustomServiceOrchestrator(config, 
controller)
 self.parallel_execution = config.get_parallel_exec_option()
@@ -229,22 +229,16 @@ class ActionQueue(threading.Thread):
   elif commandType == self.STATUS_COMMAND:
 component_name = command['componentName']
 
-if component_name in self.hangingStatusCommands and not 
self.hangingStatusCommands[component_name].isAlive():
-  del self.hangingStatusCommands[component_name]
+thread = threading.Thread(target = self.execute_status_command, args = 
(command,))
+thread.daemon = True # hanging status commands should not be prevent 
ambari-agent from stopping
+thread.start()
+thread.join(timeout=self.status_command_timeout)
 
-if not component_name in self.hangingStatusCommands:
-  thread = threading.Thread(target = self.execute_status_command, args 
= (command,))
-  thread.daemon = True # hanging status commands should not be prevent 
ambari-agent from stopping
-  thread.start()
-  thread.join(timeout=self.status_command_timeout)
-
-  if thread.isAlive():
-# Force context to reset to normal. By context we mean sys.path, 
imports, logger setting, etc. They are set by specific status command, and are 
not relevant to ambari-agent.
-PythonReflectiveExecutor.last_context.revert()
-logger.warn("Command {0} for {1} is running for more than {2} 
seconds. Skipping it for current pack of status commands.".format(commandType, 
component_name, self.status_command_timeout))
-self.hangingStatusCommands[component_name] = thread
-else:
-  logger.info("Not running {0} for {1}, because previous one is still 
running.".format(commandType, component_name))
+if thread.isAlive():
+  terminate_thread(thread)
+  # Force context to reset to normal. By context we mean sys.path, 
imports, logger setting, etc. They are set by specific status command, and are 
not relevant to ambari-agent.
+  PythonReflectiveExecutor.last_context.revert()
+  logger.warn("Command {0} for {1} was running for more than {2} 
seconds. Terminated due to timeout.".format(commandType, component_name, 
self.status_command_timeout))
   else:
 logger.error("Unrecognized command " + pprint.pformat(command))
 except Exception:

http://git-wip-us.apache.org/repos/asf/ambari/blob/9332b381/ambari-common/src/main/python/ambari_commons/thread_utils.py
--
diff --git a/ambari-common/src/main/python/ambari_commons/thread_utils.py 
b/ambari-common/src/main/python/ambari_commons/thread_utils.py
new file mode 100644
index 000..952022c
--- /dev/null
+++ b/ambari-common/src/main/python/ambari_commons/thread_utils.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+
+'''
+Licensed to the Apache Software Foundation (ASF) 

ambari git commit: AMBARI-18627. Add service wizard hung at Choose services page as no ClusterStackVersion is available with state=CURRENT (alexantonenko)

2016-10-18 Thread alexantonenko
Repository: ambari
Updated Branches:
  refs/heads/trunk 3fc0b3e66 -> ee2a12527


AMBARI-18627. Add service wizard hung at Choose services page as no 
ClusterStackVersion is available with state=CURRENT (alexantonenko)


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

Branch: refs/heads/trunk
Commit: ee2a12527864dd1238b18366badfec89465444b3
Parents: 3fc0b3e
Author: Alex Antonenko 
Authored: Tue Oct 18 17:00:16 2016 +0300
Committer: Alex Antonenko 
Committed: Tue Oct 18 18:03:24 2016 +0300

--
 .../main/admin/stack_and_upgrade_controller.js  |  22 ++-
 ambari-web/app/controllers/wizard.js|  12 +-
 ambari-web/app/utils/ajax/ajax.js   |   2 +-
 .../admin/stack_and_upgrade_controller_test.js  | 154 ---
 4 files changed, 156 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ee2a1252/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
--
diff --git 
a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js 
b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index 01feb14..58344b2 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -678,7 +678,7 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
   },
   error: errorCallback
 });
-  },  
+  },
 
   /**
* error callback of abortUpgrade()
@@ -1430,7 +1430,7 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
   stackVersionNumber = App.get('currentStackVersion');
 return stackVersionNumber;
   },
-  
+
   /**
* perform validation if skip is  false and run save if
* validation successfull or run save without validation is skip 
is true
@@ -1447,7 +1447,7 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
   } else {
 var repoVersion = self.prepareRepoForSaving(repo);
 var stackVersionNumber = self.getStackVersionNumber(repo);
-
+
 App.ajax.send({
   name: 'admin.stack_versions.edit.repo',
   sender: this,
@@ -1464,7 +1464,7 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 });
 return deferred.promise();
   },
-  
+
   /**
* send request for validation for each repository
* @param {Em.Object} repo
@@ -1475,7 +1475,7 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
 var deferred = $.Deferred(),
   totalCalls = 0,
   invalidUrls = [];
-
+
 if (skip) {
   deferred.resolve(invalidUrls);
 } else {
@@ -1903,10 +1903,16 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
* @param {object|null} jsonData
*/
   loadServiceVersionFromVersionDefinitionsSuccessCallback: function (jsonData) 
{
-var rv = jsonData.items[0].repository_versions[0].RepositoryVersions;
+var versions = Em.getWithDefault(jsonData, 'items', []);
+var currentVersion = versions.filterProperty('ClusterStackVersions.state', 
'CURRENT')[0];
+var rv = currentVersion || versions.filter(function(i) {
+  return i.ClusterStackVersions.stack === App.get('currentStackName') &&
+   i.ClusterStackVersions.version === App.get('currentStackVersionNumber');
+})[0];
 var map = this.get('serviceVersionsMap');
-if (rv) {
-  rv.stack_services.forEach(function (item) {
+var stackServices = Em.getWithDefault(rv || {}, 
'repository_versions.0.RepositoryVersions.stack_services', false);
+if (stackServices) {
+  stackServices.forEach(function (item) {
 map[item.name] = item.versions[0];
   });
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ee2a1252/ambari-web/app/controllers/wizard.js
--
diff --git a/ambari-web/app/controllers/wizard.js 
b/ambari-web/app/controllers/wizard.js
index e0df4fa..05cd35c 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -696,10 +696,16 @@ App.WizardController = 
Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
 
   serviceVersionsMap: {},
   loadServiceVersionFromVersionDefinitionsSuccessCallback: function (jsonData) 
{
-var rv = jsonData.items[0].repository_versions[0].RepositoryVersions;
+var versions = Em.getWithDefault(jsonData, 'items', []);
+var currentVersion = 

ambari git commit: AMBARI-18609. Implement a way to configure Stack Upgrade Merger to skip particular properties to be merged from stack defaults (aonishuk)

2016-10-18 Thread aonishuk
Repository: ambari
Updated Branches:
  refs/heads/trunk 61cc3a9e6 -> 3fc0b3e66


AMBARI-18609. Implement a way to configure Stack Upgrade Merger to skip 
particular properties to be merged from stack defaults (aonishuk)


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

Branch: refs/heads/trunk
Commit: 3fc0b3e66b605bc628e9994be1c96c2c46396388
Parents: 61cc3a9
Author: Andrew Onishuk 
Authored: Tue Oct 18 17:54:51 2016 +0300
Committer: Andrew Onishuk 
Committed: Tue Oct 18 17:54:51 2016 +0300

--
 .../internal/UpgradeResourceProvider.java   |  4 +-
 .../ambari/server/state/ConfigHelper.java   | 17 +++---
 .../ambari/server/state/PropertyInfo.java   | 11 
 .../state/PropertyStackUpgradeBehavior.java | 57 
 .../src/main/resources/configuration-schema.xsd |  5 ++
 .../services/STORM/configuration/storm-site.xml |  1 +
 .../StackUpgradeConfigurationMergeTest.java |  4 +-
 .../internal/UpgradeResourceProviderTest.java   |  6 +--
 8 files changed, 91 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3fc0b3e6/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index d37e32b..7b7a7a3 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -,10 +,10 @@ public class UpgradeResourceProvider extends 
AbstractControllerResourceProvider
   // used when determining if a property has been customized and should be
   // overriden with the new stack value)
   Map> oldStackDefaultConfigurationsByType = 
configHelper.getDefaultProperties(
-  currentStackId, cluster);
+  currentStackId, cluster, true);
 
   // populate a map with default configurations from the new stack
-  newConfigurationsByType = 
configHelper.getDefaultProperties(targetStackId, cluster);
+  newConfigurationsByType = 
configHelper.getDefaultProperties(targetStackId, cluster, true);
 
   // We want to skip updating config-types of services that are not in the 
upgrade pack.
   // Care should be taken as some config-types could be in services that 
are in and out

http://git-wip-us.apache.org/repos/asf/ambari/blob/3fc0b3e6/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
index 70c24f9..197ffdd 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
@@ -944,11 +944,12 @@ public class ConfigHelper {
* @param cluster
*  the cluster to use when determining which services default
*  configurations to include (not {@code null}).
+   * @param onStackUpgradeFilter if true skip {@code } properties
* @return a mapping of configuration type to map of key/value pairs for the
* default configurations.
* @throws AmbariException
*/
-  public Map> getDefaultProperties(StackId stack, 
Cluster cluster)
+  public Map> getDefaultProperties(StackId stack, 
Cluster cluster, boolean onStackUpgradeFilter)
   throws AmbariException {
 Map> defaultPropertiesByType = new 
HashMap>();
 
@@ -962,9 +963,10 @@ public class ConfigHelper {
   if (!defaultPropertiesByType.containsKey(type)) {
 defaultPropertiesByType.put(type, new HashMap());
   }
-
-  defaultPropertiesByType.get(type).put(stackDefaultProperty.getName(),
-  stackDefaultProperty.getValue());
+  if (!onStackUpgradeFilter || 
stackDefaultProperty.getPropertyStackUpgradeBehavior().isMerge()) {
+defaultPropertiesByType.get(type).put(stackDefaultProperty.getName(),
+stackDefaultProperty.getValue());
+  }
 }
 
 // for every installed service, 

ambari git commit: AMBARI-18626 UI doesn't show validation errors for removed properties. (ababiichuk)

2016-10-18 Thread ababiichuk
Repository: ambari
Updated Branches:
  refs/heads/trunk a93c0f400 -> 61cc3a9e6


AMBARI-18626 UI doesn't show validation errors for removed properties. 
(ababiichuk)


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

Branch: refs/heads/trunk
Commit: 61cc3a9e6100216ccb114d07a64619d9191f17cd
Parents: a93c0f4
Author: ababiichuk 
Authored: Tue Oct 18 15:43:13 2016 +0300
Committer: ababiichuk 
Committed: Tue Oct 18 15:43:13 2016 +0300

--
 ambari-web/app/mixins/common/serverValidator.js | 22 ++--
 .../test/mixins/common/serverValidator_test.js  | 18 +---
 2 files changed, 35 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/61cc3a9e/ambari-web/app/mixins/common/serverValidator.js
--
diff --git a/ambari-web/app/mixins/common/serverValidator.js 
b/ambari-web/app/mixins/common/serverValidator.js
index d8747d3..b251d84 100644
--- a/ambari-web/app/mixins/common/serverValidator.js
+++ b/ambari-web/app/mixins/common/serverValidator.js
@@ -183,7 +183,8 @@ App.ServerValidatorMixin = Em.Mixin.create({
 
 Em.assert('Unknown config error type ' + type, error.isError || 
error.isWarn || error.isGeneral);
 if (property) {
-  error.serviceName = App.StackService.find(Em.get(property, 
'serviceName')).get('displayName');
+  error.id = Em.get(property, 'id');
+  error.serviceName = Em.get(property, 'serviceDisplayName') || 
App.StackService.find(Em.get(property, 'serviceName')).get('displayName');
   error.propertyName = Em.get(property, 'name');
   error.filename = Em.get(property, 'filename');
   error.value = Em.get(property, 'value');
@@ -214,7 +215,9 @@ App.ServerValidatorMixin = Em.Mixin.create({
 } else {
   configErrorsMap[configId] = {
 type: item.level,
-messages: [item.message]
+messages: [item.message],
+name: item['config-name'],
+filename: item['config-type']
   }
 }
   } else {
@@ -261,6 +264,21 @@ App.ServerValidatorMixin = Em.Mixin.create({
   configErrorList.push(this.createErrorMessage(errorTypes.GENERAL, null, 
serverIssue.messages));
 }, this);
 
+Em.keys(configErrorsMap).forEach(function (id) {
+  if (!configErrorList.someProperty('id', id)) {
+var serverIssue = configErrorsMap[id],
+  filename = Em.get(serverIssue, 'filename'),
+  service = App.config.get('serviceByConfigTypeMap')[filename],
+  property = {
+id: id,
+name: Em.get(serverIssue, 'name'),
+filename: App.config.getOriginalFileName(filename),
+serviceDisplayName: service && Em.get(service, 'displayName')
+  };
+configErrorList.push(this.createErrorMessage(serverIssue.type, 
property, serverIssue.messages));
+  }
+}, this);
+
 return configErrorList;
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/61cc3a9e/ambari-web/test/mixins/common/serverValidator_test.js
--
diff --git a/ambari-web/test/mixins/common/serverValidator_test.js 
b/ambari-web/test/mixins/common/serverValidator_test.js
index 943eb57..cdd69fb 100644
--- a/ambari-web/test/mixins/common/serverValidator_test.js
+++ b/ambari-web/test/mixins/common/serverValidator_test.js
@@ -76,6 +76,10 @@ describe('App.ServerValidatorMixin', function () {
 'c4_f4': {
   type: 'ERROR',
   messages: ['error4']
+},
+'c5_f5': {
+  type: 'ERROR',
+  messages: ['error5']
 }
   },
   generalErrors: [{
@@ -116,10 +120,16 @@ describe('App.ServerValidatorMixin', function () {
   var error = result.find(function(r) { return r.propertyName === 'c4' && 
r.filename === 'f4'; });
   expect(error).to.be.undefined;
 });
+
+it('should add issues for deleted properties', function () {
+  var error = result.find(function(r) { return r.id === 'c5_f5'; });
+  expect(error.messages).to.eql(['error5']);
+});
   });
 
   describe('#createErrorMessage', function() {
 var property = {
+  id: 'p1_f1',
   name: 'p1',
   filename: 'f1',
   value: 'v1',
@@ -148,12 +158,13 @@ describe('App.ServerValidatorMixin', function () {
 filename: 'f1',
 value: 'v1',
 description: 'd1',
-serviceName: 'sName'
+serviceName: 'sName',
+id: 'p1_f1'
   });
 });
 
 it('creates