Could be that the status command isn't returning sane values. From the 
docs: http://docs.puppetlabs.com/references/latest/type.html#service

hasstatusDeclare whether the service’s init script has a functional status 
command; defaults to true. This attribute’s default value changed in Puppet 
2.7.0. 

The init script’s status command must return 0 if the service is running 
and a nonzero value otherwise. Ideally, these exit codes should conform to the 
LSB’s 
specification<http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html>for
 init script status actions, but Puppet only considers the difference 
between 0 and nonzero to be relevant.

If a service’s init script does not support any kind of status command, you 
should set hasstatus to false and either provide a specific command using 
the status attribute or expect that Puppet will look for the service name 
in the process table. Be aware that ‘virtual’ init scripts (like ‘network’ 
under Red Hat systems) will respond poorly to refresh events from other 
resources if you override the default behavior without providing a status 
command. Valid values are true, false.
So you should manually check the return code of the status command from 
fusioninventory-agent's init script, to make sure it's conformant. If it's 
not, you'll have to set hasstatus to false and status to some reasonable 
command, as the docs mention.

On Thursday, May 23, 2013 7:32:59 AM UTC-7, Stan wrote:
>
> Hi
>
> I create a manifest for fusioninventory-agent on my puppet server
>
> On my puppet client if i modify file /etc/sysconfig/fusioninventory-agent 
> the file fusioninventory-agent replace by puppet server configuration (this 
> is OK)
>
> But if i stop fusioninventory-agent on my puppet client, puppet server not 
> start the service and i don't know why
>
> If you see an error in my configuration, say me
>
> regards
>
>
> class fusioninventory-agent::redhat {
>
> package { 'fusioninventory-agent':
>                  ensure => present,
>         }
>
> file { '/etc/sysconfig/fusioninventory-agent':
>                         ensure => present,
>                         owner => 'root',
>                         group => 'root',
>                         mode => 0644,
>                         content => 
> template("/etc/puppet/modules/fusioninventory-agent/templates/fusioninventory-agent.erb"),
>                         require => Package["fusioninventory-agent"],
>                         notify => Service["fusioninventory-agent"]
>         }
>
>
> service { 'fusioninventory-agent':
>                         ensure => running,
>                         hasstatus => true,
>                         hasrestart => true,
>                         enable => true,
>                         require => 
> File['/etc/sysconfig/fusioninventory-agent']
>         }
> }
>

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to