ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject ambari git commit: AMBARI-9632. MySQL server start failed on Ubuntu12 (aonishuk)
Date Fri, 13 Feb 2015 16:58:11 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 4bdc4ad74 -> a4550d12d


AMBARI-9632. MySQL server start failed on Ubuntu12 (aonishuk)


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

Branch: refs/heads/trunk
Commit: a4550d12d6376a88da962985cf6fdf1257ad7ebf
Parents: 4bdc4ad
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Fri Feb 13 18:58:05 2015 +0200
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Fri Feb 13 18:58:05 2015 +0200

----------------------------------------------------------------------
 .../HIVE/0.12.0.2.0/package/scripts/mysql_server.py          | 1 +
 .../HIVE/0.12.0.2.0/package/scripts/mysql_service.py         | 2 +-
 .../HIVE/0.12.0.2.0/package/scripts/params.py                | 1 +
 .../HIVE/0.12.0.2.0/package/scripts/status_params.py         | 1 +
 .../src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py   | 8 ++++----
 5 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a4550d12/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py
index 40ddb86..dcfb567 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_server.py
@@ -55,6 +55,7 @@ class MysqlServer(Script):
 
   def status(self, env):
     import status_params
+    env.set_params(status_params)
 
     mysql_service(daemon_name=status_params.daemon_name, action='status')
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/a4550d12/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_service.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_service.py
index 136fe03..c48c1ef 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_service.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_service.py
@@ -22,7 +22,7 @@ from resource_management import *
 
 
 def mysql_service(daemon_name=None, action='start'): 
-  status_cmd = format("pgrep -l '^{daemon_name}$'")
+  status_cmd = format("pgrep -l '^{process_name}$'")
   cmd = ('service', daemon_name, action)
 
   if action == 'status':

http://git-wip-us.apache.org/repos/asf/ambari/blob/a4550d12/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py
index b10706a..c6bb3f2 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params.py
@@ -254,6 +254,7 @@ else:
   log4j_exec_props = None
 
 daemon_name = status_params.daemon_name
+process_name = status_params.process_name
 hive_env_sh_template = config['configurations']['hive-env']['content']
 
 hive_hdfs_user_dir = format("/user/{hive_user}")

http://git-wip-us.apache.org/repos/asf/ambari/blob/a4550d12/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
index 66de02a..14300d5 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/status_params.py
@@ -30,6 +30,7 @@ hive_metastore_pid = 'hive.pid'
 hcat_pid_dir = config['configurations']['hive-env']['hcat_pid_dir'] #hcat_pid_dir
 webhcat_pid_file = format('{hcat_pid_dir}/webhcat.pid')
 
+process_name = 'mysqld'
 if System.get_instance().os_family == "suse" or System.get_instance().os_family == "ubuntu":
   daemon_name = 'mysql'
 else:

http://git-wip-us.apache.org/repos/asf/ambari/blob/a4550d12/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py
index d0d701f..5f6b751 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py
@@ -46,7 +46,7 @@ class TestMySqlServer(RMFTestCase):
 
     self.assertResourceCalled('Execute', ('service','mysql','start'),
                        logoutput = True,
-                       not_if = 'pgrep -l \'^mysql$\'',
+                       not_if = 'pgrep -l \'^mysqld$\'',
                        sudo = True,
     )
     self.assertNoMoreResources()
@@ -61,7 +61,7 @@ class TestMySqlServer(RMFTestCase):
     )
     self.assertResourceCalled('Execute', ('service','mysql','stop'),
                               logoutput = True,
-                              only_if = 'pgrep -l \'^mysql$\'',
+                              only_if = 'pgrep -l \'^mysqld$\'',
                               sudo = True,
     )
     self.assertNoMoreResources()
@@ -89,7 +89,7 @@ class TestMySqlServer(RMFTestCase):
 
     self.assertResourceCalled('Execute', ('service','mysql','start'),
                               logoutput = True,
-                              not_if = 'pgrep -l \'^mysql$\'',
+                              not_if = 'pgrep -l \'^mysqld$\'',
                               sudo = True,
                               )
     self.assertNoMoreResources()
@@ -105,7 +105,7 @@ class TestMySqlServer(RMFTestCase):
     
     self.assertResourceCalled('Execute', ('service','mysql','stop'),
                               logoutput = True,
-                              only_if = 'pgrep -l \'^mysql$\'',
+                              only_if = 'pgrep -l \'^mysqld$\'',
                               sudo = True,
                               )
     self.assertNoMoreResources()


Mime
View raw message