Author: swagle
Date: Fri Mar 8 18:29:46 2013
New Revision: 1454487
URL: http://svn.apache.org/r1454487
Log:
AMBARI-1594. Ambari UI shows failed services while processes are running on the
server. (swagle)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/params.pp
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/service.pp
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/templates/hadoop-env.sh.erb
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hcat/manifests/init.pp
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-templeton/templates/webhcat-env.sh.erb
incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1454487&r1=1454486&r2=1454487&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Fri Mar 8 18:29:46 2013
@@ -445,6 +445,9 @@ Trunk (unreleased changes):
BUG FIXES
+ AMBARI-1594. Ambari UI shows failed services while processes are running
+ on the server. (swagle)
+
AMBARI-1582. Cannot start hadoop services after hdfs re-configuration
and amabri server restart. (swagle)
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp?rev=1454487&r1=1454486&r2=1454487&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/init.pp
Fri Mar 8 18:29:46 2013
@@ -173,7 +173,7 @@ class hdp-hadoop(
hdp::directory_recursive_create { $logdirprefix:
owner => 'root'
}
- $piddirprefix = $hdp-hadoop::params::hadoop_piddirprefix
+ $piddirprefix = $hdp-hadoop::params::hadoop_pid_dir_prefix
hdp::directory_recursive_create { $piddirprefix:
owner => 'root'
}
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/params.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/params.pp?rev=1454487&r1=1454486&r2=1454487&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/params.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/params.pp
Fri Mar 8 18:29:46 2013
@@ -58,8 +58,8 @@ class hdp-hadoop::params(
$hdfs_log_dir_prefix =
hdp_default("hadoop/hadoop-env/hdfs_log_dir_prefix","/var/log/hadoop")
- $hadoop_piddirprefix =
hdp_default("hadoop/hadoop-env/hadoop_piddirprefix","/var/run/hadoop")
- $run_dir = $hadoop_piddirprefix
+ $hadoop_pid_dir_prefix =
hdp_default("hadoop/hadoop-env/hadoop_pid_dir_prefix","/var/run/hadoop")
+ $run_dir = $hadoop_pid_dir_prefix
$namenode_formatted_mark_dir = "${run_dir}/hdfs/namenode/formatted/"
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/service.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/service.pp?rev=1454487&r1=1454486&r2=1454487&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/service.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/manifests/service.pp
Fri Mar 8 18:29:46 2013
@@ -30,7 +30,7 @@ define hdp-hadoop::service(
$security_enabled = $hdp::params::security_enabled
#NOTE does not work if namenode and datanode are on same host
- $pid_dir = "${hdp-hadoop::params::hadoop_piddirprefix}/${user}"
+ $pid_dir = "${hdp-hadoop::params::hadoop_pid_dir_prefix}/${user}"
if (($security_enabled == true) and ($name == 'datanode')) {
$run_as_root = true
@@ -40,7 +40,7 @@ define hdp-hadoop::service(
if (($security_enabled == true) and ($name == 'datanode')) {
$hdfs_user = $hdp::params::hdfs_user
- $pid_file =
"${hdp-hadoop::params::hadoop_piddirprefix}/${hdfs_user}/hadoop-${hdfs_user}-${name}.pid"
+ $pid_file =
"${hdp-hadoop::params::hadoop_pid_dir_prefix}/${hdfs_user}/hadoop-${hdfs_user}-${name}.pid"
} else {
$pid_file = "${pid_dir}/hadoop-${user}-${name}.pid"
}
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/templates/hadoop-env.sh.erb
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/templates/hadoop-env.sh.erb?rev=1454487&r1=1454486&r2=1454487&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/templates/hadoop-env.sh.erb
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hadoop/templates/hadoop-env.sh.erb
Fri Mar 8 18:29:46 2013
@@ -78,8 +78,8 @@ export HADOOP_SECURE_DN_LOG_DIR=<%=scope
# export HADOOP_SLAVE_SLEEP=0.1
# The directory where pid files are stored. /tmp by default.
-export
HADOOP_PID_DIR=<%=scope.function_hdp_template_var("hadoop_piddirprefix")%>/$USER
-export
HADOOP_SECURE_DN_PID_DIR=<%=scope.function_hdp_template_var("hadoop_piddirprefix")%>/$HADOOP_SECURE_DN_USER
+export
HADOOP_PID_DIR=<%=scope.function_hdp_template_var("hadoop_pid_dir_prefix")%>/$USER
+export
HADOOP_SECURE_DN_PID_DIR=<%=scope.function_hdp_template_var("hadoop_pid_dir_prefix")%>/$HADOOP_SECURE_DN_USER
# A string representing this instance of hadoop. $USER by default.
export HADOOP_IDENT_STRING=$USER
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hcat/manifests/init.pp
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hcat/manifests/init.pp?rev=1454487&r1=1454486&r2=1454487&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hcat/manifests/init.pp
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-hcat/manifests/init.pp
Fri Mar 8 18:29:46 2013
@@ -23,6 +23,7 @@ class hdp-hcat(
) inherits hdp-hcat::params
{
$hcat_config_dir = $hdp-hcat::params::hcat_conf_dir
+ $hcat_pid_dir = $hdp-hcat::params::hcat_pid_dir
if ($hdp::params::use_32_bits_on_slaves == false) {
$size = 64
@@ -41,8 +42,13 @@ class hdp-hcat(
service_state => $service_state,
force => true
}
+
+ hdp::directory { $hcat_pid_dir:
+ service_state => $service_state,
+ force => true
+ }
- Hdp::Package['hcat'] -> Hdp::Directory[$hcat_config_dir]
+ Hdp::Package['hcat'] -> Hdp::Directory[$hcat_config_dir] ->
Hdp::Directory[$hcat_pid_dir]
} elsif ($service_state == 'installed_and_configured') {
hdp::package { 'hcat' :
@@ -53,10 +59,18 @@ class hdp-hcat(
service_state => $service_state,
force => true
}
-
+
+ hdp::directory_recursive_create { $hcat_pid_dir:
+ owner => $webhcat_user,
+ service_state => $service_state,
+ force => true
+ }
+
+ hdp::user{ $webhcat_user:}
+
hdp-hcat::configfile { 'hcat-env.sh':}
- Hdp::Package['hcat'] -> Hdp::Directory[$hcat_config_dir] ->
Hdp-hcat::Configfile<||>
+ Hdp::Package['hcat'] -> Hdp::User[$webhcat_user] ->
Hdp::Directory[$hcat_config_dir] ->
Hdp::Directory_recursive_create[$hcat_pid_dir] -> Hdp-hcat::Configfile<||>
} else {
hdp_fail("TODO not implemented yet: service_state = ${service_state}")
}
Modified:
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-templeton/templates/webhcat-env.sh.erb
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-templeton/templates/webhcat-env.sh.erb?rev=1454487&r1=1454486&r2=1454487&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-templeton/templates/webhcat-env.sh.erb
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/puppet/modules/hdp-templeton/templates/webhcat-env.sh.erb
Fri Mar 8 18:29:46 2013
@@ -21,7 +21,7 @@
#
# The file containing the running pid
-PID_FILE=<%=scope.function_hdp_template_var("templeton_pid_dir")%>/webhcat.pid
+PID_FILE=<%=scope.function_hdp_template_var("hcat_pid_dir")%>/webhcat.pid
TEMPLETON_LOG_DIR=<%=scope.function_hdp_template_var("hcat_log_dir")%>/
Modified:
incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py?rev=1454487&r1=1454486&r2=1454487&view=diff
==============================================================================
---
incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
(original)
+++
incubator/ambari/trunk/ambari-agent/src/main/python/ambari_agent/AmbariConfig.py
Fri Mar 8 18:29:46 2013
@@ -141,7 +141,7 @@ servicesToPidNames = {
'GANGLIA_MONITOR': 'gmond.pid',
'HBASE_MASTER': 'hbase-[A-Za-z0-9_]+-master.pid',
'HBASE_REGIONSERVER': 'hbase-[A-Za-z0-9_]+-regionserver.pid',
- 'HCATALOG_SERVER': 'hcat.pid',
+ 'HCATALOG_SERVER': 'webhcat.pid',
'KERBEROS_SERVER': 'kadmind.pid',
'HIVE_SERVER': 'hive-server.pid',
'HIVE_METASTORE': 'hive.pid',