thank you David~

I changed some config,and  it work fine~

service { 'puppet':
  ensure => 'running',
  enable => 'false',
}


changed

service { 'puppet':
  ensure => 'running',
  enable => 'false',
  hasstatus => 'false',  status => '/etc/init.d/puppet status'
}


as you said  .  if the service not running,  in 5 ,the status script won't 
work,the puppet think the service are running .and then run stop script,and 
the report will always print the change info




在 2014年8月14日星期四UTC+8下午6时31分27秒,David Schmitt写道:
>
> The init script on 5 only checks for running puppet processes. "puppet 
> resource" is a puppet process. Therefore the init script thinks the 
> service is running. 
>
> Solution: use Service#pattern to match bettern on the process name. 
>
>
>
> Regards, David 
>
> On 2014-08-14 12:06, li jackie wrote: 
> > when i disable puppet service ,centos5.3 system always have change: " 
> > Notice: /Stage[main]/Puppet/Service[puppet]/ensure: ensure changed 
> > 'running' to 'stopped' Notice: Finished catalog run in 1.15 seconds" 
> > 
> > just say the code : 
> > 
> > |[root@xen-21206-vm02 ~]# puppet resource service puppet -d 
> > 
> > Debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc 
> does not exist 
> > Debug: Puppet::Type::Service::ProviderOpenrc: file /sbin/rc-service does 
> not exist 
> > Debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl does 
> not exist 
> > Debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update does 
> not exist 
> > Debug: Puppet::Type::Service::ProviderDebian: file /usr/sbin/update-rc.d 
> does not exist 
> > Debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not 
> exist 
> > Debug: Puppet::Type::Service::ProviderSystemd: file systemctl does not 
> exist 
> > Debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc 
> does not exist 
> > Debug: Puppet::Type::Service::ProviderOpenrc: file /sbin/rc-service does 
> not exist 
> > Debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl does 
> not exist 
> > Debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update does 
> not exist 
> > Debug: Puppet::Type::Service::ProviderDebian: file /usr/sbin/update-rc.d 
> does not exist 
> > Debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not 
> exist 
> > Debug: Puppet::Type::Service::ProviderSystemd: file systemctl does not 
> exist 
> > Debug: Executing '/sbin/service puppet status' 
> > Debug: Executing '/sbin/chkconfig puppet' 
> > 
> > 
> > service { 'puppet': 
> >    ensure => 'running', 
> >    enable => 'false', 
> > } 
> > 
> > 
> > [root@xen-21206-vm02 ~]# /sbin/service puppet status 
> > puppet is stopped 
> > [root@xen-21206-vm02 ~]# echo $? 
> > 3 
> > | 
> > 
> > this agent get the wrong service status.should 
> > 
> > |service { 'puppet': 
> >    ensure => 'stopped', 
> >    enable => 'false', 
> > } 
> > | 
> > 
> > who can help me? 
> > 
> > thks 
> > 
> > 
> > my puppet version   :  3.2.3 
> > 
> > -- 
> > 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] <javascript:> 
> > <mailto:[email protected] <javascript:>>. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/puppet-users/df4ac6b9-c8b2-47ed-8f12-e45b00030b6e%40googlegroups.com
>  
> > <
> https://groups.google.com/d/msgid/puppet-users/df4ac6b9-c8b2-47ed-8f12-e45b00030b6e%40googlegroups.com?utm_medium=email&utm_source=footer>.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>
> -- 
> * Always looking for people I can help with awesome projects * 
> G+: https://plus.google.com/+DavidSchmitt 
> Blog: http://club.black.co.at/log/ 
> LinkedIn: http://at.linkedin.com/in/davidschmitt 
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/db416090-321e-4a03-904e-17376199b29f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to