Make bugzilla-queue init script support SuSE

RESOLVED FIXED in Bugzilla 4.0

Status

()

Bugzilla
Installation & Upgrading
--
enhancement
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: mrbball, Assigned: mrbball)

Tracking

unspecified
Bugzilla 4.0
All
Linux
Bug Flags:
approval +

Details

Attachments

(1 attachment, 2 obsolete attachments)

6.05 KB, patch
Max Kanat-Alexander
: review+
Details | Diff | Splinter Review
(Assignee)

Description

8 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.13) 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
(Assignee)

Comment 1

8 years ago
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.
Attachment #443345 - Flags: review?(mkanat)
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.
(Assignee)

Comment 3

8 years ago
Ok, so /lib/lsb/init-function doesn't source /etc/rc.status?  I guess I
mistook that for part of LSB. :-(

Comment 4

8 years ago
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.
Assignee: installation → kar

Comment 5

8 years ago
Comment on attachment 443345 [details] [diff] [review]
V1 - against tip

So that's an r- for modifying the existing script.
Attachment #443345 - Flags: review?(mkanat) → review-

Updated

8 years ago
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: LSB-ize bugzilla-queue init script → Make bugzilla-queue init script support SuSE
(Assignee)

Comment 6

8 years ago
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.
Attachment #444102 - Flags: review?(mkanat)
(Assignee)

Updated

8 years ago
Attachment #443345 - Attachment is obsolete: true

Comment 7

8 years ago
Comment on attachment 444102 [details] [diff] [review]
v2

Looks good! What about SuSE derivatives, are there any? Will this script work on them?
Attachment #444102 - Flags: review?(mkanat) → review+

Updated

8 years ago
Flags: approval+
Target Milestone: --- → Bugzilla 3.8

Comment 8

8 years ago
  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).
Keywords: relnote
(Assignee)

Comment 9

8 years ago
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

Comment 10

8 years ago
  Okay, great. :-) Yeah, if you could test it, that would be great.
(Assignee)

Comment 11

8 years ago
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?
Status: NEW → ASSIGNED

Comment 12

8 years ago
  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.
(Assignee)

Comment 13

8 years ago
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.
Attachment #444102 - Attachment is obsolete: true
Attachment #445802 - Flags: review?(mkanat)

Comment 14

8 years ago
Comment on attachment 445802 [details] [diff] [review]
v3 (involves a rename)

Cool, looks good!
Attachment #445802 - Attachment description: v3 → v3 (involves a rename)
Attachment #445802 - Flags: review?(mkanat) → review+

Comment 15

8 years ago
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.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED

Comment 16

7 years ago
Added to the release notes in bug 604256.
Keywords: relnote
You need to log in before you can comment on or make changes to this bug.