Hi John,

Thanks for your reply.I used metaparmeters to define order of execution and 
it is working now.

Regards,
Sathish.
On Thursday, July 3, 2014 8:13:10 PM UTC+5:30, jcbollinger wrote:
>
>
>
> On Wednesday, July 2, 2014 8:33:08 AM UTC-5, Satish Katuru wrote:
>>
>>
>> Hi,
>>
>> Please see my init.pp file.
>>
>> First I am stopping the Jboss server and then deleting few 
>> folders,copying files and then trying to start the service.
>>
>> When I place file copy statements it is not working. With out file copy 
>> statements I am able to stop the service and start the service.
>>
>> I am not sure why it is happening like that.
>>
>> Can any one give us suggestions?
>>
>>
>> I am using below command for the execution:
>>
>> *sudo puppet agent -t --waitforcert=60 (with debug)*
>>
>>
>
> Ok.  Do note that you shouldn't need --waitforcert any more after the 
> first successful run, but including it is harmless.
>
>  
>
>>
>> Service stop and folder deletion was successfull.But When I Included the 
>> file copy statements like below Service is not getting started.
>>
>
>
> What does the Puppet --debug output say?  Does it show 
> Service[startjavaservice.sh] being applied successfully?
>
> What do the JBoss logs say?  Is startup failing because JBoss doesn't like 
> the contents of the file, for example?
>
>  
>
>> ( 
>>
>> file 
>>
>> {
>>
>>
>> "/home/katusa02/soa/jboss-soa-p-5/jboss-as/server/default/deploy/RulesService-1.0.esb":
>>
>> ensure => "present",
>>
>> mode => "0644",
>>
>> owner => "katusa02",
>>
>> group => "katusa02",
>>
>> source => "puppet://$puppetserver/modules/httpd/RulesService-1.0.esb",
>>
>>  
>>
>> }
>> )
>>
>>
>> *Init.pp*
>>
>> class httpd
>> {
>>
>>
>> service{
>> "stopjavaservice.sh":
>> ensure =>"stopped",
>> }
>>
>>
>>
>> file 
>>
>> {
>>
>> "/home/katusa02/soa/jboss-soa-p-5/jboss-as/server/default/tmp":
>> ensure => "absent",
>> force => "true",
>> recurse => "true",
>> owner => "katusa02",
>>
>> }
>>
>>
>> file 
>>
>> {
>>
>> "/home/katusa02/soa/jboss-soa-p-5/jboss-as/server/default/work":
>> ensure => "absent",
>> force => "true",
>> recurse => "true",
>> owner => "katusa02",
>>
>> }
>>
>>
>>
>> file 
>>
>> {
>>
>> "/home/katusa02/soa/jboss-soa-p-5/jboss-as/server/default/log":
>> ensure => "absent",
>> force => "true",
>> recurse => "true",
>> owner => "katusa02",
>>
>> }
>>
>> file 
>>
>> {
>>
>> "/home/katusa02/soa/jboss-soa-p-5/jboss-as/server/default/data":
>> ensure => "absent",
>> force => "true",
>> recurse => "true",
>> owner => "katusa02",
>>
>> }
>>
>>
>> file 
>>
>> {
>>
>> "/home/katusa02/JBossRuntime/log":
>> ensure => "absent",
>> force => "true",
>> recurse => "true",
>> owner => "katusa02",
>>
>> }
>>
>> file 
>>
>> {
>>
>> "/home/katusa02/JBossRuntime/data":
>> ensure => "absent",
>> force => "true",
>> recurse => "true",
>> owner => "katusa02",
>>
>> }
>>
>>
>> file 
>>
>> {
>>
>> "/home/katusa02/JBossRuntime/server.log":
>> ensure => "absent",
>> force => "true",
>> recurse => "true",
>> owner => "katusa02",
>>
>> }
>>
>>
>> service{
>> "startjavaservice.sh":
>> ensure =>"running",
>> }
>>
>>
>> }
>>
>>
>>
>> Am i Missing any thing here? Do I need to wait for some amount of time 
>> for each run?
>>
>
>
> Does the command "service startjavaservice.sh start" (or its equivalent 
> for your platform) return before all JBoss-hosted components are fully up 
> and running?  I think I remember that in days of yore, JBoss's own startup 
> script returned after JBoss itself was booted, but without waiting for 
> deployment or startup of anything inside.
>
> Additionally, you have a serious issue with order of application.  
> Resources are not guaranteed to be applied by the agent in the order that 
> they are added to the catalog by the master.  This is what the chaining 
> arrows and the 'require' and 'before' metaparameters are for.  Use them.
>
> Furthermore, if you have different "services" to start and stop the same 
> JBoss instance, then you are misusing the service management facilities of 
> Puppet and your OS.  Use Execs instead if you really just want to run 
> different for-purpose scripts.  Or use an Exec to stop JBoss, and a bona 
> fide Service to later ensure that it is running.
>
>
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/3430a0b6-43fc-4817-810a-90cd40c8a647%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to