ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Onischuk" <aonis...@hortonworks.com>
Subject Re: Review Request 39146: Make mysql service check more robust
Date Fri, 30 Oct 2015 17:42:40 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39146/#review104590
-----------------------------------------------------------



ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_service.py
(line 26)
<https://reviews.apache.org/r/39146/#comment162822>

    packages for mysql are different on Oses.
    Please make sure you tested this on:
    - Centos
    - Sles or Opensuse
    - Ubuntu or Debian


- Andrew Onischuk


On Oct. 8, 2015, 10:20 p.m., Thomas Friedrich wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39146/
> -----------------------------------------------------------
> 
> (Updated Oct. 8, 2015, 10:20 p.m.)
> 
> 
> Review request for Ambari and Andrew Onischuk.
> 
> 
> Bugs: AMBARI-13238
>     https://issues.apache.org/jira/browse/AMBARI-13238
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The MySQL service check in mysql_service.py simply checks for a process with name mysqld.
In our environment, a different service ran another MySQL instance on that node and as a result,
the status of the MySQL service in Hive showed green (because it could find a mysqld process)
even though the instance used by Hive wasn't started. That also made the "Start Service" action
for Hive fail, because the metastore service couldn't connect to the MySQL database.
> 
> The proposed fix makes the service check more robust by retrieving the pid_file of the
MySQL instance first by running "mysqladmin variables" and parsing out the pid_file. Then
it checks if the process exists. 
> 
> As a side-note: the initial fix tried to get the pid_file from the /etc/my.cnf file but
I found that while this is one default location for the MySQL configuration, there are other
places where the file can be referenced. Since the MySQL instance launched by Hive is not
getting any parameters for config file or pid_file, MySQL must read it from one of the default
locations and running "mysqladmin variables" must return the config values for the running
instance used by Hive. The other instance running needs to explicitely set values for config
file and pid because otherwise would collide with the default instance.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/mysql_service.py
c48c1ef 
>   ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py 1155e9f 
> 
> Diff: https://reviews.apache.org/r/39146/diff/
> 
> 
> Testing
> -------
> 
> Updated UTs in test_mysql_server.py with new status command and ran them successfully.
Also manually tested in an installed cluster environment.
> 
> 
> Thanks,
> 
> Thomas Friedrich
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message