You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2015/05/20 18:37:29 UTC

[1/2] ambari git commit: AMBARI-11267 - [WinTP2] Metrics Monitor Install Fails

Repository: ambari
Updated Branches:
  refs/heads/trunk b21f48299 -> 6a3fe5472


AMBARI-11267 - [WinTP2] Metrics Monitor Install Fails


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

Branch: refs/heads/trunk
Commit: 440f5c7757d3fd433ce899a83e3fb75d611e771d
Parents: b21f482
Author: Artem Baranchuk <ab...@hortonworks.con>
Authored: Wed May 20 16:57:52 2015 +0300
Committer: Artem Baranchuk <ab...@hortonworks.con>
Committed: Wed May 20 19:36:54 2015 +0300

----------------------------------------------------------------------
 .../resource_management/core/providers/windows/service.py | 10 ++++++----
 .../0.1.0/package/scripts/params_windows.py               |  5 +++--
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/440f5c77/ambari-common/src/main/python/resource_management/core/providers/windows/service.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/core/providers/windows/service.py b/ambari-common/src/main/python/resource_management/core/providers/windows/service.py
index 174acea..8e6ddff 100644
--- a/ambari-common/src/main/python/resource_management/core/providers/windows/service.py
+++ b/ambari-common/src/main/python/resource_management/core/providers/windows/service.py
@@ -108,7 +108,7 @@ class ServiceConfigProvider(Provider):
   def action_install(self):
     hSCM = safe_open_scmanager()
 
-    self._fix_system_user_name()
+    self._fix_user_name()
 
     try:
       hSvc = win32service.CreateService(hSCM,
@@ -142,7 +142,7 @@ class ServiceConfigProvider(Provider):
     try:
       hSvc = safe_open_service(hSCM, self.resource.service_name)
 
-      self._fix_system_user_name()
+      self._fix_user_name()
 
       try:
         win32service.ChangeServiceConfig(hSvc,
@@ -174,7 +174,7 @@ class ServiceConfigProvider(Provider):
     try:
       hSvc = safe_open_service(hSCM, self.resource.service_name)
 
-      self._fix_system_user_name()
+      self._fix_user_name()
 
       try:
         win32service.ChangeServiceConfig(hSvc,
@@ -219,9 +219,11 @@ class ServiceConfigProvider(Provider):
     finally:
       win32service.CloseServiceHandle(hSCM)
 
-  def _fix_system_user_name(self):
+  def _fix_user_name(self):
     if self.resource.username.upper() == "NT AUTHORITY\\SYSTEM":
       self.resource.username = None
+    elif self.resource.username.find("\\") == -1:
+      self.resource.username = ".\\" + self.resource.username
 
   def _is_system_user(self):
     if self.resource.username in ["NT AUTHORITY\\SYSTEM", "NT AUTHORITY\\NetworkService", "NT AUTHORITY\\LocalService"]:

http://git-wip-us.apache.org/repos/asf/ambari/blob/440f5c77/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py
index 85a65e6..139e2bb 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/params_windows.py
@@ -23,7 +23,8 @@ from resource_management import *
 
 config = Script.get_config()
 
-ams_user = "hadoop"
+hadoop_user = config["configurations"]["cluster-env"]["hadoop.user.name"]
+ams_user = hadoop_user
 ams_collector_conf_dir = os.environ["COLLECTOR_CONF_DIR"]
 ams_collector_home_dir = os.environ["COLLECTOR_HOME"]
 ams_monitor_conf_dir = os.environ["MONITOR_CONF_DIR"]
@@ -35,5 +36,5 @@ hadoop_conf_dir = os.path.join(os.environ["HADOOP_HOME"], "conf")
 hbase_conf_dir = os.path.join(os.environ["COLLECTOR_HOME"], "hbase", "conf")
 
 ams_collector_win_service_name = "AmbariMetricsCollector"
-ams_monitor_win_service_name = "AmbariMetricsCollector"
+ams_monitor_win_service_name = "AmbariMetricsHostMonitoring"
 ams_embedded_hbase_win_service_name = "ams_hbase_master"


[2/2] ambari git commit: AMBARI-11270 - [WinTP2] Check Ambari Metrics fails because it is scheduled before Ambari Metrics Collector/Monitor start

Posted by ab...@apache.org.
AMBARI-11270 - [WinTP2] Check Ambari Metrics fails because it is scheduled before Ambari Metrics Collector/Monitor start


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

Branch: refs/heads/trunk
Commit: 6a3fe547286dd56b917c9608396ca58fb7572a00
Parents: 440f5c7
Author: Artem Baranchuk <ab...@hortonworks.con>
Authored: Wed May 20 19:04:34 2015 +0300
Committer: Artem Baranchuk <ab...@hortonworks.con>
Committed: Wed May 20 19:36:55 2015 +0300

----------------------------------------------------------------------
 .../src/main/resources/stacks/HDPWIN/2.1/role_command_order.json   | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6a3fe547/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json
index 731d389..dc55533 100644
--- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/role_command_order.json
@@ -53,6 +53,8 @@
   },
   "_comment" : "Dependencies that are used when GLUSTERFS is not present in cluster",
   "optional_no_glusterfs": {
+    "METRICS_COLLECTOR-START": ["NAMENODE-START", "DATANODE-START"],
+    "AMBARI_METRICS_SERVICE_CHECK-SERVICE_CHECK": ["METRICS_COLLECTOR-START", "HDFS_SERVICE_CHECK-SERVICE_CHECK"],
     "SECONDARY_NAMENODE-START": ["NAMENODE-START"],
     "RESOURCEMANAGER-START": ["NAMENODE-START", "DATANODE-START"],
     "NODEMANAGER-START": ["NAMENODE-START", "DATANODE-START", "RESOURCEMANAGER-START"],