User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:18.104.22.168) Gecko/2009073021 Firefox/3.0.13 Build Identifier: Bugzilla 3.4.6 The bugzilla-queue script which is the init script used to control The init script for Bugzilla's jobqueue daemon (contrib/bugzilla-queue), does not work on SuSE systems. It is apparently specific to RH systems. It should be ported to Linux Standard Base (LSB) format. I will attach a patch to bugzilla-queue that I believe conforms to LSB specs. It implements all actions that are expected to be there: start, stop, restart, try-restart, force-reload, reload and status. Reproducible: Always
Created attachment 443345 [details] [diff] [review] V1 - against tip LSB-ized version of bugzilla-queue. I do not have a RHEL system to test this on. Tested on SuSE 10.1.
RHEL5's /lib/lsb/init-functions appears to support LSB 3.1. It does not implement the following functions that you're making use of: rc_status checkproc rc_reset rc_failed rc_exit I'm guessing the above functions are SuSE-specific. They're not part of a newer LSB spec (I just looked at the LSB 4.0 spec - they aren't defined there). RHEL5 does not include any of them as command-line executables either.
Ok, so /lib/lsb/init-function doesn't source /etc/rc.status? I guess I mistook that for part of LSB. :-(
Okay. So if there's no LSB way to do this, we could instead add some code to detect SuSE (similarly to how we detect RHEL now in gd_install) and include a separate SuSE initscript for that situation.
Comment on attachment 443345 [details] [diff] [review] V1 - against tip So that's an r- for modifying the existing script.
Created attachment 444102 [details] [diff] [review] v2 How's this? I updated contrib to contain two init scripts: one for suse and one for rhel/other (default). If on a SuSE system, the suse version is installed. Otherwise, the rhel version is installed.
Comment on attachment 444102 [details] [diff] [review] v2 Looks good! What about SuSE derivatives, are there any? Will this script work on them?
That is, I'm mostly curious as to whether /etc/SuSE-release is the most reliable way of checking whether or not we're on SuSE (or whether or not we want the SuSE script).
I'm willing to test it on all SuSE derivatives I have access to: OpenSuse, SuSE Linux and SLES (versions 9, 10 & 11). My production Bugzilla server is running SuSE Linux 10.1 and I've also tried it on SLES9 & SLES11 so far. According to Novell's own web site, /etc/SuSE-release is the way to check whether or not we're on SuSE: http://www.novell.com/coolsolutions/feature/11251.html
Okay, great. :-) Yeah, if you could test it, that would be great.
I've tested it on all SuSE variants I have access to: OpenSuse (i.e. SuSE Linux - 9 & 10) and SLES (9, 10, 11). The init script itself works great. However, installing it is a problem. The Required-Start: and Required-Stop: lines list "MTA" and "mysqld", and those do not work for SuSE systems. Reasonable replacements might be "sendmail" and "mysql", respectively, but I don't think either are even necessary. What does the jobqueue daemon do if mail_delivery_method is set to Test or None? I think you can still have it installed/running, even if the MTA is not running. And even if mail_delivery_method is set to a particular MTA, it doesn't appear that the MTA needs to be "enabled" (as indicated by chkconfig). It simply needs to be running. Also, if the MySQL server for a Bugzilla installation is a separate system, the mysql service would not need to be enabled or running on the Bugzilla server! So, I want to simply remove "MTA" and "mysqld" from the Required-Start: and Required-Stop: lines in bugzilla-queue for SuSE systems. Does that make sense? Would it make sense in the default case as well?
You can remove the Required-Start and Required-Stop from the SuSE script. Actually, they're not technically doing anything in the RHEL script at the moment, I believe, so they could probably be removed there as well.
Created attachment 445802 [details] [diff] [review] v3 (involves a rename) Removed "MTA" and "mysqld" from Required-Start and Required-Stop in the SuSE script. The jobqueue daemon is now installed correctly as a system service and will start as expected at runlevels 3 and 5 on SuSE variants.
Comment on attachment 445802 [details] [diff] [review] v3 (involves a rename) Cool, looks good!
Thanks for the patch, Kent! :-) Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/ modified Bugzilla/JobQueue/Runner.pm renamed contrib/bugzilla-queue => contrib/bugzilla-queue.rhel added contrib/bugzilla-queue.suse Committed revision 7183.
Added to the release notes in bug 604256.