You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vi...@apache.org on 2012/06/07 02:46:30 UTC
svn commit: r1347228 - in /incubator/ambari/branches/ambari-186: ./
hmc/puppet/modules/hdp-ganglia/manifests/
Author: vikram
Date: Thu Jun 7 00:46:30 2012
New Revision: 1347228
URL: http://svn.apache.org/viewvc?rev=1347228&view=rev
Log:
AMBARI-421. Ganglia uninstall does not remove libganglia or gmond (Contributed by Richard)
Modified:
incubator/ambari/branches/ambari-186/CHANGES.txt
incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/init.pp
incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor.pp
incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor_and_server.pp
incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/server.pp
Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347228&r1=1347227&r2=1347228&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Thu Jun 7 00:46:30 2012
@@ -6,6 +6,8 @@ characters wide.
Release 0.1.x - unreleased
+ AMBARI-421. Ganglia uninstall does not remove libganglia or gmond (Richard via Vikram)
+
AMBARI-423. Uninstall cluster can't be automated by Selenium due to the internal confirmation window (Yusaku via Vikram)
AMBARI-422. Increase Threshold For Number Of Successive Backend Connection Failures (Varun via Vikram)
Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/init.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/init.pp?rev=1347228&r1=1347227&r2=1347228&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/init.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/init.pp Thu Jun 7 00:46:30 2012
@@ -1,29 +1,38 @@
class hdp-ganglia(
- $service_state = $hdp::params::cluster_client_state
+ $service_state
)
{
- include hdp-ganglia::params
- $gmetad_user = $hdp-ganglia::params::gmetad_user
- $gmond_user = $hdp-ganglia::params::gmond_user
- $ganglia_config_dir = $hdp-ganglia::params::ganglia_shell_cmds_dir
-
- user { $gmond_user : shell => '/bin/bash'} #provision for nobody user
- if ( $gmetad_user != $gmond_user) {
- user { $gmetad_user : shell => '/bin/bash'} #provision for nobody user
- }
- if ($service_state == 'no_op') {
- } elsif ($service_state == 'uninstalled') {
- hdp::package { 'ganglia-monitor' :
- ensure => 'uninstalled'
- }
- } elsif ($service_state in ['running','installed_and_configured','stopped']) {
- hdp::package { 'ganglia-monitor':
- java_needed => false
- }
- }
+ if ($service_state != 'no_op') {
+ include hdp-ganglia::params
+ $gmetad_user = $hdp-ganglia::params::gmetad_user
+ $gmond_user = $hdp-ganglia::params::gmond_user
+ $ganglia_config_dir = $hdp-ganglia::params::ganglia_shell_cmds_dir
+
+ anchor{'hdp-ganglia::begin':}
+ if ($service_state == 'uninstalled') {
+ hdp::package { 'ganglia-monitor' :
+ ensure => 'uninstalled'
+ }
+ package { 'libganglia' :
+ ensure => 'purged'
+ }
+ Anchor['hdp-ganglia::begin'] -> Hdp::Package['ganglia-monitor'] -> Package['libganglia'] -> Anchor['hdp-ganglia::end']
- anchor{'hdp-ganglia::begin':} -> User<|title == $gmond_user or title == $gmetad_user|> ->
- Hdp::Package['ganglia-monitor'] -> anchor{'hdp-ganglia::end':}
+ } elsif ($service_state in ['running','installed_and_configured','stopped']) {
+ user { $gmond_user : shell => '/bin/bash'} #provision for nobody user
+ if ( $gmetad_user != $gmond_user) {
+ user { $gmetad_user : shell => '/bin/bash'} #provision for nobody user
+ }
+
+ hdp::package { 'ganglia-monitor':
+ java_needed => false
+ }
+
+ Anchor['hdp-ganglia::begin'] -> User<|title == $gmond_user or title == $gmetad_user|> ->
+ Hdp::Package['ganglia-monitor'] -> Anchor['hdp-ganglia::end']
+ }
+ anchor{'hdp-ganglia::end':}
+ }
}
class hdp-ganglia::service::gmond(
Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor.pp?rev=1347228&r1=1347227&r2=1347228&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor.pp Thu Jun 7 00:46:30 2012
@@ -4,17 +4,19 @@ class hdp-ganglia::monitor(
$opts = {}
) inherits hdp-ganglia::params
{
+
+ #note: includes the common package ganglia-monitor
+ class { 'hdp-ganglia':
+ service_state => $service_state
+ }
if ($service_state == 'no_op') {
} elsif ($service_state in ['uninstalled']) {
- #note: includes the common package ganglia-monitor
- include hdp-ganglia
class { 'hdp-ganglia::config':
ganglia_server_host => $ganglia_server_host,
service_state => $service_state
}
} elsif ($service_state in ['running','stopped','installed_and_configured']) {
#note: includes the common package ganglia-monitor
- include hdp-ganglia
class { 'hdp-ganglia::config':
ganglia_server_host => $ganglia_server_host,
service_state => $service_state
Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor_and_server.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor_and_server.pp?rev=1347228&r1=1347227&r2=1347228&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor_and_server.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/monitor_and_server.pp Thu Jun 7 00:46:30 2012
@@ -7,6 +7,11 @@ class hdp-ganglia::monitor_and_server(
$ganglia_conf_dir = $hdp-ganglia::params::ganglia_conf_dir
$ganglia_runtime_dir = $hdp-ganglia::params::ganglia_runtime_dir
+ #note: includes the common package ganglia-monitor
+ class { 'hdp-ganglia':
+ service_state => $service_state
+ }
+
if ($service_state == 'no_op') {
} elsif ($service_state in ['uninstalled']) {
class { 'hdp-ganglia::server::packages':
@@ -22,12 +27,10 @@ class hdp-ganglia::monitor_and_server(
service_state => $service_state
}
- Class['hdp-ganglia::server::packages'] ->
+ Class['hdp-ganglia'] -> Class['hdp-ganglia::server::packages'] ->
Hdp::Directory[$ganglia_conf_dir] -> Hdp::Directory[$ganglia_runtime_dir] ->
Class['hdp-ganglia::config']
} elsif ($service_state in ['running','stopped','installed_and_configured']) {
- class { 'hdp-ganglia': }
-
class { 'hdp-ganglia::server::packages': }
class { 'hdp-ganglia::config':
Modified: incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/server.pp
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/server.pp?rev=1347228&r1=1347227&r2=1347228&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/server.pp (original)
+++ incubator/ambari/branches/ambari-186/hmc/puppet/modules/hdp-ganglia/manifests/server.pp Thu Jun 7 00:46:30 2012
@@ -6,9 +6,15 @@ class hdp-ganglia::server(
$ganglia_shell_cmds_dir = $hdp-ganglia::params::ganglia_shell_cmds_dir
$ganglia_conf_dir = $hdp-ganglia::params::ganglia_conf_dir
$ganglia_runtime_dir = $hdp-ganglia::params::ganglia_runtime_dir
+
+ #note: includes the common package ganglia-monitor
+ class { 'hdp-ganglia':
+ service_state => $service_state
+ }
if ($service_state == 'no_op') {
} elsif ($service_state == 'uninstalled') {
+
class { 'hdp-ganglia::server::packages':
ensure => 'uninstalled'
}
@@ -29,10 +35,9 @@ class hdp-ganglia::server(
}
#top level no anchors needed
- Class['hdp-ganglia::server::packages'] -> Hdp::Directory[$ganglia_shell_cmds_dir] -> Hdp::Directory[$ganglia_conf_dir] -> Hdp::Directory[$ganglia_runtime_dir]
+ Class['hdp-ganglia'] -> Class['hdp-ganglia::server::packages'] -> Hdp::Directory[$ganglia_shell_cmds_dir] -> Hdp::Directory[$ganglia_conf_dir] -> Hdp::Directory[$ganglia_runtime_dir]
} elsif ($service_state in ['running','stopped','installed_and_configured']) {
- include hdp-ganglia #note: includes the common package ganglia-monitor
class { 'hdp-ganglia::server::packages': }