This is an automated email from the ASF dual-hosted git repository.

aonishuk pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.6 by this push:
     new 59ec1ed  AMBARI-23149. Installation of MySQL fails on CentOS 7.2, 
should install mariadb (aonishuk)
59ec1ed is described below

commit 59ec1edde74b122f80d6a80854855a6ff0f46de6
Author: Andrew Onishuk <aonis...@hortonworks.com>
AuthorDate: Mon Mar 12 15:46:21 2018 +0200

    AMBARI-23149. Installation of MySQL fails on CentOS 7.2, should install 
mariadb (aonishuk)
---
 .../main/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml  | 7 +------
 .../HIVE/0.12.0.2.0/package/scripts/mysql_service.py             | 9 +++++----
 .../HIVE/0.12.0.2.0/package/scripts/status_params.py             | 3 ++-
 .../src/main/resources/stacks/HDP/2.1/services/HIVE/metainfo.xml | 7 +------
 .../src/main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml | 7 +------
 .../src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml | 7 +------
 .../src/main/resources/stacks/HDP/2.5/services/HIVE/metainfo.xml | 7 +------
 7 files changed, 12 insertions(+), 35 deletions(-)

diff --git 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml
index f34f696..44e9b54 100644
--- 
a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml
+++ 
b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/metainfo.xml
@@ -301,12 +301,7 @@
           <osFamily>redhat7</osFamily>
           <packages>
             <package>
-              <name>mysql-community-release</name>
-              <skipUpgrade>true</skipUpgrade>
-              <condition>should_install_mysql</condition>
-            </package>
-            <package>
-              <name>mysql-community-server</name>
+              <name>mariadb-server</name>
               <skipUpgrade>true</skipUpgrade>
               <condition>should_install_mysql</condition>
             </package>
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 1666269..bb82709 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
@@ -27,10 +27,11 @@ POSSIBLE_DAEMON_NAMES = ['mysql', 'mysqld', 'mariadb']
 def get_daemon_name():
   import status_params
   
-  for possible_daemon_name in status_params.POSSIBLE_DAEMON_NAMES:
-    daemon_path = os.path.join(status_params.SERVICES_DIR, 
possible_daemon_name)
-    if os.path.exists(daemon_path):
-      return possible_daemon_name
+  for service_file_template in status_params.SERVICE_FILE_TEMPLATES:
+    for possible_daemon_name in status_params.POSSIBLE_DAEMON_NAMES:
+      daemon_path = service_file_template.format(possible_daemon_name)
+      if os.path.exists(daemon_path):
+        return possible_daemon_name
 
   raise Fail("Could not find service daemon for mysql")
 
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 d1ca98d..2d432f3 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
@@ -74,7 +74,8 @@ else:
   Logger.info('MariaDB RedHat Support: %s' % mariadb_redhat_support)
   process_name = 'mysqld'
 
-  SERVICES_DIR = '/etc/init.d'
+  
+  SERVICE_FILE_TEMPLATES = ['/etc/init.d/{0}', 
'/usr/lib/systemd/system/{0}.service']
   POSSIBLE_DAEMON_NAMES = ['mysql', 'mysqld', 'mariadb']
 
   # Security related/required params
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/metainfo.xml
index f3eaa8c..9ef3a9a 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.1/services/HIVE/metainfo.xml
@@ -70,12 +70,7 @@
           <osFamily>redhat7</osFamily>
           <packages>
             <package>
-              <name>mysql-community-release</name>
-              <skipUpgrade>true</skipUpgrade>
-              <condition>should_install_mysql</condition>
-            </package>
-            <package>
-              <name>mysql-community-server</name>
+              <name>mariadb-server</name>
               <skipUpgrade>true</skipUpgrade>
               <condition>should_install_mysql</condition>
             </package>
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml
index 49a4e69..961fcb0 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.2/services/HIVE/metainfo.xml
@@ -84,12 +84,7 @@
           <osFamily>redhat7</osFamily>
           <packages>
             <package>
-              <name>mysql-community-release</name>
-              <skipUpgrade>true</skipUpgrade>
-              <condition>should_install_mysql</condition>
-            </package>
-            <package>
-              <name>mysql-community-server</name>
+              <name>mariadb-server</name>
               <skipUpgrade>true</skipUpgrade>
               <condition>should_install_mysql</condition>
             </package>
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml
index 53b8dd0..7980721 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/HIVE/metainfo.xml
@@ -55,12 +55,7 @@
           <osFamily>redhat7</osFamily>
           <packages>
             <package>
-              <name>mysql-community-release</name>
-              <skipUpgrade>true</skipUpgrade>
-              <condition>should_install_mysql</condition>
-            </package>
-            <package>
-              <name>mysql-community-server</name>
+              <name>mariadb-server</name>
               <skipUpgrade>true</skipUpgrade>
               <condition>should_install_mysql</condition>
             </package>
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/metainfo.xml 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/metainfo.xml
index fb72d98..1ca6933 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/metainfo.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/metainfo.xml
@@ -179,12 +179,7 @@
           <osFamily>redhat7</osFamily>
           <packages>
             <package>
-              <name>mysql-community-release</name>
-              <skipUpgrade>true</skipUpgrade>
-              <condition>should_install_mysql</condition>
-            </package>
-            <package>
-              <name>mysql-community-server</name>
+              <name>mariadb-server</name>
               <skipUpgrade>true</skipUpgrade>
               <condition>should_install_mysql</condition>
             </package>

-- 
To stop receiving notification emails like this one, please contact
aonis...@apache.org.

Reply via email to