Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.0 3432564fa -> d6b0fff63
  refs/heads/trunk 31a497f45 -> ee6754a72


AMBARI-9953 Ambari Metrics monitor restart failed with error JAVA_HOME is not 
set

Ensure config() gets called on restart(), when this one is invoked before 
start().


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

Branch: refs/heads/trunk
Commit: ee6754a7258e6ed43df8bda86506cceaba410989
Parents: 31a497f
Author: Florian Barca <[email protected]>
Authored: Fri Mar 6 09:24:11 2015 -0800
Committer: Florian Barca <[email protected]>
Committed: Fri Mar 6 09:24:11 2015 -0800

----------------------------------------------------------------------
 .../AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py     | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ee6754a7/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
index a5cb74c..6ffe0e6 100644
--- 
a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
+++ 
b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/metrics_collector.py
@@ -51,6 +51,9 @@ class AmsCollector(Script):
     import params
     env.set_params(params)
 
+    # Sometimes, stop() may be called before start(), in case restart() is 
initiated right after installation
+    self.configure(env) # for security
+
     ams_service( 'collector', action = 'stop')
 
   def status(self, env):

Reply via email to