Dear all,

As stated in the title, I have a module for ganglia gmond, where puppet is 
always doing '*/etc/init.d/ganglia-monitor start*' instead of '*restart*' 
whenever a 'refresh' is triggered for the service. This is what I have in 
my module:


file { 'gmond_conf':
>         name    => '/etc/ganglia/gmond.conf',
>         ensure  => file, mode    => '0644',
>         owner   => 'root', group => 'root',
>         content => template('ganglia/slv_gmond_conf.erb'),
>         require => Package['ganglia-monitor'],
>         notify   => Service['ganglia-monitor'],
> } ~>
>
> service { 'ganglia-monitor':
>         ensure      => running,
>         enable      => true,
>         hasrestart => true,
>         hasstatus  => false,
>         #restart    => undef,
>         subscribe  => File['gmond_conf'],
>         require     => [ File['gmond_conf'], Package['ganglia-monitor'] ];
> }
>
>
And this is the error I get:


Info: FileBucket adding {md5}ac59a119cca8e15b40e85ea496d39970
> Info: /Stage[main]/Ganglia::Install/File[gmond_conf]: Filebucketed 
> /etc/ganglia/gmond.conf to puppet with sum ac59a119cca8e15b40e85ea496d39970
> Notice: /Stage[main]/Ganglia::Install/File[gmond_conf]/content: content 
> changed '{md5}ac59a119cca8e15b40e85ea496d39970' to 
> '{md5}29218a6ac8b11868c311dcbbf26cdf83'
> Info: /Stage[main]/Ganglia::Install/File[gmond_conf]: Scheduling refresh 
> of Service[ganglia-monitor]
> Info: /Stage[main]/Ganglia::Install/File[gmond_conf]: Scheduling refresh 
> of Service[ganglia-monitor]
> Info: /Stage[main]/Ganglia::Install/File[gmond_conf]: Scheduling refresh 
> of Service[ganglia-monitor]
> Debug: /Stage[main]/Ganglia::Install/File[gmond_conf]: The container 
> Class[Ganglia::Install] will propagate my refresh event
> Debug: Service[ganglia-monitor](provider=debian): Executing 'ps -ef'
> Debug: Executing '/etc/init.d/ganglia-monitor start'
> Error: Could not start Service[ganglia-monitor]: Execution of 
> '/etc/init.d/ganglia-monitor start' returned 1: 
> Error: /Stage[main]/Ganglia::Install/Service[ganglia-monitor]/ensure: 
> change from stopped to running failed: Could not start 
> Service[ganglia-monitor]: Execution of '/etc/init.d/ganglia-monitor start' 
> returned 1: 
>


As a result, *gmond* never restarted when the config file is changed. In 
fact it actually fails (returns 1) id "start' is used whilst the service is 
still running.

 

> root@ip-10-0-24-28:~# /usr/sbin/service ganglia-monitor start; echo $?
> Starting Ganglia Monitor Daemon: /usr/sbin/gmond already running.
> 1
> root@ip-10-0-24-28:~# 
>


Am I missing something here? Or how can I force puppet to use 'restart' 
instead? I'm using Puppet v3.2.3. 
Thanks in advance. Cheers!!

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to