Hi,
Rewriting the script is indeed a good solution, check
http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
The service resource has also the "status" and "hasstatus" resource.
Maybe using one or both of them could also solve your problem
Puppet describe service gives more documention
Grts
Jo
On 02/07/2013 04:28 PM, Dan White wrote:
A better way would be, IMHO, to modify the init-script to do the
correct things for both the JBoss processes and Puppet.
I am working in that direction with the stuff I have to maintain.
Stacks running apache, mysql, tomcat and other things. Rather than
one init-script for each, I'd like to implement an init-script that
will start / stop / restart / status the entire stack at once as well
as individual pieces thereof.
“Sometimes I think the surest sign that intelligent life exists
elsewhere in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)
------------------------------------------------------------------------
*From: *"GRANIER Bernard (MORPHO)" <bernard.gran...@morpho.com>
*To: *puppet-users@googlegroups.com
*Sent: *Thursday, February 7, 2013 10:17:06 AM
*Subject: *RE: [Puppet Users] Re: service ressource on CentOS 6.3
Hi,
Thanks for your anwser, to solve my problem I write an exec resource
with a kill …
That should not be puppet spirit, anyway it runs …
Cordialement,
Bernard Granier
CE Plateforme Système
bernard.gran...@morpho.com <mailto:bernard.gran...@morpho.com>
01 58 11 32 51
*From:*puppet-users@googlegroups.com
[mailto:puppet-users@googlegroups.com] *On Behalf Of *jcbollinger
*Sent:* Thursday, February 07, 2013 3:28 PM
*To:* puppet-users@googlegroups.com
*Subject:* [Puppet Users] Re: service ressource on CentOS 6.3
On Thursday, February 7, 2013 4:49:18 AM UTC-6, bernard...@morpho.com
<mailto:bernard...@morpho.com> wrote:
Error: /Stage[main]/Jbossuninstall/Service[jboss]/ensure: change from
running to stopped failed: Could not stop Service[jboss]: Execution of
'/sbin/service jboss stop' returned :
In fact command /sbin/service jboss stop returns 143, is it the error
reason ?
Yes. Linux Standards Base specifications call for initscript actions
other than 'status' to return 0 on success, and Puppet relies on your
services to comply. Supposing that Jboss is in fact stopped
successfully in your scenario, the initscript is defective on account
of returning the wrong code. This is not a CentOS problem, because
CentOS did not provide whatever Jboss package you are using.
Supposing that you don't want to fix the Jboss init script, you can
work around its buggy behavior by declaring a custom 'stop' command
for the Service resource. You'll have to determine the details to
match your requirements and the behavior of the initscript. If you
don't care whether jboss really does stop then it might be '/bin/bash
-c "/sbin/service jboss stop || /bin/true"'.
John
--
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
<mailto:puppet-users+unsubscr...@googlegroups.com>.
To post to this group, send email to puppet-users@googlegroups.com
<mailto: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.
#
" This e-mail and any attached documents may contain confidential or
proprietary information. If you are not the intended recipient, you
are notified that any dissemination, copying of this e-mail and any
attachments thereto or use of their contents by any means whatsoever
is strictly prohibited. If you have received this e-mail in error,
please advise the sender immediately and delete this e-mail and all
attached documents from your computer system."
#
--
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.
--
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.
--
Johan De Wit
Open Source Consultant
Red Hat Certified Engineer (805008667232363)
Puppet Certified Professional 2013 (PCP0000006)
_________________________________________________________
Open-Future Phone +32 (0)2/255 70 70
Zavelstraat 72 Fax +32 (0)2/255 70 71
3071 KORTENBERG Mobile +32 (0)474/42 40 73
BELGIUM http://www.open-future.be
_________________________________________________________
--
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.