This is an automatically generated e-mail. To reply, visit:

Review request for Ambari, Alejandro Fernandez, Andrew Onischuk, and Dmitro 

Bugs: AMBARI-13238

Repository: ambari


The MySQL service status 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. 

A new pacth is proposed based on the reviews added to the original one 

The patch relies now on the pid (similar to other status check). mysql pid_file 
is not known a priori (it is not a service property similar to other ambari 
components) and it depends on the OS. 
The pid file location is obatined with  "mysqladmin variables" command (which 
seems recognized by all the Ambari supported OS). 
The Hive MySQL server instance is started without passing in any parameters so 
It uses the default configuration. Any other MySQL instance that could be 
running on the machine would need to be started with explicit config.
Hence just running mysqladmin will return the values for the Hive MySQL 
The pid dile name is parsed by a new method which has been created to obatin it 
from the mysqladmin variables return.
The status relies now on check_process_status() wich is already an ambari 
Unit Test have been modified accordingly to avoid the pgrep verification that 
could create conflicts with others mysql instances working on the same node.


  ambari-server/src/test/python/stacks/2.0.6/HIVE/test_mysql_server.py 827f6f7 

Diff: https://reviews.apache.org/r/48766/diff/


+1 overall. Here are the results of testing the latest attachment 
against trunk revision .
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 1 new or modified test files.
+1 javac. The applied patch does not increase the total number of javac 
compiler warnings.
+1 release audit. The applied patch does not increase the total number of 
release audit warnings.
+1 core tests. The patch passed unit tests in ambari-server.
Test results: 
Console output: 
This message is automatically generated.


Juanjo  Marron

Reply via email to