Skip to content

Commit

Permalink
AMBARI-23149. Installation of MySQL fails on CentOS 7.2, should insta…
Browse files Browse the repository at this point in the history
…ll mariadb (aonishuk)
  • Loading branch information
aonishuk committed Mar 6, 2018
1 parent 8cd0a62 commit ac7dee0
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 35 deletions.
Expand Up @@ -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>
Expand Down
Expand Up @@ -27,10 +27,11 @@
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")

Expand Down
Expand Up @@ -69,7 +69,8 @@
webhcat_pid_file = format('{hcat_pid_dir}/webhcat.pid')

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']


Expand Down
Expand Up @@ -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>
Expand Down
Expand Up @@ -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>
Expand Down
Expand Up @@ -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>
Expand Down
Expand Up @@ -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>
Expand Down

0 comments on commit ac7dee0

Please sign in to comment.