Last modified: 2013-09-24 07:51:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53817, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51817 - Jenkins: init script is crap
Jenkins: init script is crap
Status: NEW
Product: Wikimedia
Classification: Unclassified
Continuous integration (Other open bugs)
wmf-deployment
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-22 16:01 UTC by Antoine "hashar" Musso (WMF)
Modified: 2013-09-24 07:51 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Antoine "hashar" Musso (WMF) 2013-07-22 16:01:12 UTC
The Jenkins init script provided with the Debian package does not properly track the pidfile.  It writes in jenkins.pid the pid of daemon instead of the spawned java process, that cause the restart/reload/stop targets to not work properly.

To make it worth, the init script provided for opensuse/rpm and debian are all different.
Comment 1 Andre Klapper 2013-07-23 09:33:10 UTC
Is that worth to upstream to http://bugs.debian.org ? 
If so, which exact Jenkins version does this refer to?
Comment 2 Antoine "hashar" Musso (WMF) 2013-09-24 07:51:18 UTC
$ cat /var/run/jenkins/jenkins.pid 
32018
$

Pid 32018 is /usr/bin/daemon with --pidfile=/var/run/jenkins/jenkins.pid

Its children was pid 32020 which is the java process.

When using the init script 'stop' command, it send a signal to daemon and java process belong to jenkins:

killall -u jenkins java daemon

jenkins log:

 Sep 24, 2013 7:46:23 AM winstone.Logger logInternal
 INFO: JVM is terminating. Shutting down Winstone
 Exception in thread "Channel reader thread: integration-debian-builder"  java.lang.NullPointerException
	at hudson.model.Computer.getNode(Computer.java:465)
	at hudson.slaves.SlaveComputer.getNode(SlaveComputer.java:176)
	at hudson.plugins.sshslaves.SSHLauncher.afterDisconnect(SSHLauncher.java:963)
	at hudson.slaves.SlaveComputer$2.onClosed(SlaveComputer.java:419)
	at hudson.remoting.Channel.terminate(Channel.java:749)
	at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:69)


But both daemon and java are still running after and the pidfile got deleted.


Have to kill -9 the process :(

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links