Hi, I''m use the continuous integration server Jenkins. It''s deplyed as a debian package on ubuntu. Puppet seems to have some issues restarting the service. Actually when a ''refresh'' is needed, the jenkins process is killed but not restarted. Puppet does not log any failures regarding the start command so I don''t really know what''s going on. See the log below. is there a way to get more info from Puppet? how to you change the log level for instance? Jul 25 05:04:21 dev-c3-ci-02 puppet-agent[12264]: (/Stage[main]/ Jenkins/Service[jenkins]) Triggered ''refresh'' from 2 events Jul 25 05:04:23 dev-c3-ci-02 puppet-agent[12264]: Finished catalog run in 19.55 seconds Jul 25 05:04:23 dev-c3-ci-02 jenkins: jenkins: client (pid 31805) exited with 143 status Also, I tried to explicitly set the start/stop commands in the service definition, but I''m not really sure about my script. Could you please review it. Here it is: service { ''jenkins'' enable => true, ensure => "running", start => "/etc/init.d/jenkins start", stop => "/etc/init.d/jenkins stop", require => Package["jenkins"], } are the start/stop attribute correct? Any recommandations? Thanks in advance for you help, Alexis -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Jul 24, 2011, at 10:50 PM, Alexis Midon wrote:> Hi, > > I''m use the continuous integration server Jenkins. It''s deplyed as a > debian package on ubuntu. Puppet seems to have some issues restarting > the service. Actually when a ''refresh'' is needed, the jenkins process > is killed but not restarted. Puppet does not log any failures > regarding the start command so I don''t really know what''s going on. > See the log below. > is there a way to get more info from Puppet? how to you change the log > level for instance? > > Jul 25 05:04:21 dev-c3-ci-02 puppet-agent[12264]: (/Stage[main]/ > Jenkins/Service[jenkins]) Triggered ''refresh'' from 2 events > Jul 25 05:04:23 dev-c3-ci-02 puppet-agent[12264]: Finished catalog run > in 19.55 seconds > Jul 25 05:04:23 dev-c3-ci-02 jenkins: jenkins: client (pid 31805) > exited with 143 status > > > Also, I tried to explicitly set the start/stop commands in the service > definition, but I''m not really sure about my script. Could you please > review it. Here it is: > > service { ''jenkins'' > enable => true, > ensure => "running", > start => "/etc/init.d/jenkins start", > stop => "/etc/init.d/jenkins stop", > require => Package["jenkins"], > } > > are the start/stop attribute correct? Any recommandations? > > Thanks in advance for you help,----- I would think the ''start/stop'' are reasonably obvious but on my Ubuntu 10.04 LTS, Jenkins has ''restart'' so instead of ''start/stop'' commands, I would replace with ''has_restart => true,'' and that should be all you need. FWIW, on my Ubuntu system, the sysv script for Jenkins doesn''t appear to have a ''refresh'' option but it does have a force-reload option... echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 Craig -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi Craig, thank you for you answer. I also tried ''has_restart => true,'' before posting on this group. It did not fix the behavior I described: jenkins getting killed but not restarted. Regarding ''refresh'', you seem to imply that the log message "Triggered ''refresh'' " means that puppet will try a ''refresh'' command. Is that correct? In which case, I''m confused because I''m only using "notify => Service[''jenkins'']" in my script. ''notify'' should trigger a restart, correct? am I missing something here? Also do you know how could increase puppet log level to get more details? Alexis On Jul 25, 7:52 am, Craig White <craig.wh...@ttiltd.com> wrote:> On Jul 24, 2011, at 10:50 PM, Alexis Midon wrote: > > > > > > > > > > > Hi, > > > I''m use the continuous integration server Jenkins. It''s deplyed as a > > debian package on ubuntu. Puppet seems to have some issues restarting > > the service. Actually when a ''refresh'' is needed, the jenkins process > > is killed but not restarted. Puppet does not log any failures > > regarding the start command so I don''t really know what''s going on. > > See the log below. > > is there a way to get more info from Puppet? how to you change the log > > level for instance? > > > Jul 25 05:04:21 dev-c3-ci-02 puppet-agent[12264]: (/Stage[main]/ > > Jenkins/Service[jenkins]) Triggered ''refresh'' from 2 events > > Jul 25 05:04:23 dev-c3-ci-02 puppet-agent[12264]: Finished catalog run > > in 19.55 seconds > > Jul 25 05:04:23 dev-c3-ci-02 jenkins: jenkins: client (pid 31805) > > exited with 143 status > > > Also, I tried to explicitly set the start/stop commands in the service > > definition, but I''m not really sure about my script. Could you please > > review it. Here it is: > > > service { ''jenkins'' > > enable => true, > > ensure => "running", > > start => "/etc/init.d/jenkins start", > > stop => "/etc/init.d/jenkins stop", > > require => Package["jenkins"], > > } > > > are the start/stop attribute correct? Any recommandations? > > > Thanks in advance for you help, > > ----- > I would think the ''start/stop'' are reasonably obvious but on my Ubuntu 10.04 LTS, Jenkins has ''restart'' so instead of ''start/stop'' commands, I would replace with ''has_restart => true,'' and that should be all you need. > > FWIW, on my Ubuntu system, the sysv script for Jenkins doesn''t appear to have a ''refresh'' option but it does have a force-reload option... > > echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 > > Craig-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Jul 25, 2011 at 10:43 AM, Alexis Midon <alexis.midon@c3-carbon.com> wrote:> Hi Craig, > thank you for you answer. > > I also tried ''has_restart => true,'' before posting on this group. It > did not fix the behavior I described: jenkins getting killed but not > restarted. > > Regarding ''refresh'', you seem to imply that the log message > "Triggered ''refresh'' " means that puppet will try a ''refresh'' command. > Is that correct? In which case, I''m confused because > I''m only using "notify => Service[''jenkins'']" in my script. ''notify'' > should trigger a restart, correct? > am I missing something here? > > Also do you know how could increase puppet log level to get more > details? > > Alexis > > > On Jul 25, 7:52 am, Craig White <craig.wh...@ttiltd.com> wrote: >> On Jul 24, 2011, at 10:50 PM, Alexis Midon wrote: >> >> >> >> >> >> >> >> >> >> > Hi, >> >> > I''m use the continuous integration server Jenkins. It''s deplyed as a >> > debian package on ubuntu. Puppet seems to have some issues restarting >> > the service. Actually when a ''refresh'' is needed, the jenkins process >> > is killed but not restarted. Puppet does not log any failures >> > regarding the start command so I don''t really know what''s going on. >> > See the log below. >> > is there a way to get more info from Puppet? how to you change the log >> > level for instance? >> >> > Jul 25 05:04:21 dev-c3-ci-02 puppet-agent[12264]: (/Stage[main]/ >> > Jenkins/Service[jenkins]) Triggered ''refresh'' from 2 events >> > Jul 25 05:04:23 dev-c3-ci-02 puppet-agent[12264]: Finished catalog run >> > in 19.55 seconds >> > Jul 25 05:04:23 dev-c3-ci-02 jenkins: jenkins: client (pid 31805) >> > exited with 143 status >> >> > Also, I tried to explicitly set the start/stop commands in the service >> > definition, but I''m not really sure about my script. Could you please >> > review it. Here it is: >> >> > service { ''jenkins'' >> > enable => true, >> > ensure => "running", >> > start => "/etc/init.d/jenkins start", >> > stop => "/etc/init.d/jenkins stop", >> > require => Package["jenkins"], >> > } >> >> > are the start/stop attribute correct? Any recommandations? >> >> > Thanks in advance for you help, >> >> ----- >> I would think the ''start/stop'' are reasonably obvious but on my Ubuntu 10.04 LTS, Jenkins has ''restart'' so instead of ''start/stop'' commands, I would replace with ''has_restart => true,'' and that should be all you need. >> >> FWIW, on my Ubuntu system, the sysv script for Jenkins doesn''t appear to have a ''refresh'' option but it does have a force-reload option... >> >> echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 >> >> Craig > > --> Also do you know how could increase puppet log level to get more > details?I think using --verbose when running puppetd might help you with regard to this. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Jul 25, 2011, at 10:43 AM, Alexis Midon wrote:> Hi Craig, > thank you for you answer. > > I also tried ''has_restart => true,'' before posting on this group. It > did not fix the behavior I described: jenkins getting killed but not > restarted. > > Regarding ''refresh'', you seem to imply that the log message > "Triggered ''refresh'' " means that puppet will try a ''refresh'' command. > Is that correct? In which case, I''m confused because > I''m only using "notify => Service[''jenkins'']" in my script. ''notify'' > should trigger a restart, correct? > am I missing something here?---- I would simply guess that whatever is supposed to be ''notify => Service["jenkins"] isn''t working but I''ve never tried it that way before myself. I would almost certainly have a class jenkins::service and thus would ''notify => Class["jenkins::service"]'' directive but it''s entirely possible your way could work. Make sure you run /etc/init.d/jenkins from the command line to ensure that it actually works and there isn''t a problem with the configuration file or setup itself. Craig -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
And adding to Craig''s comment, you should "sudo su -" to root in order to run the service script in same fashion as Puppet will. Sometimes the user environment is setup differently (i.e. JAVA_HOME). John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.