Closed Bug 398075 Opened 17 years ago Closed 16 years ago

Bugzilla should be able to display the "shutdownhtml" message even if the SQL server is down

Categories

(Bugzilla :: Administration, task, P2)

3.1.2

Tracking

()

RESOLVED FIXED
Bugzilla 3.2

People

(Reporter: LpSolit, Assigned: LpSolit)

Details

(Whiteboard: [wanted-bmo])

Attachments

(1 file)

When moving Bugzilla from one server to the other, or when the SQL server has issues and you are working on fixing them, you should be able to set the "shutdownhtml" parameter (either from the web UI if the SQL server is still working, or by editing data/params directly if the SQL server already failed) and have it displayed correctly when you are accessing Bugzilla. Currently, all you get is: Can't connect to the database. Error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Is your database installed and up and running? Do you have the correct username and password selected in localconfig? This error message is fine if the "shutdownhtml" parameter is not set, but else the content of "shutdownhtml" should be displayed instead. A first step in this direction is to fix Bugzilla::init_page() and enclose my $user = Bugzilla->login(LOGIN_OPTIONAL); my $userid = $user->id; Bugzilla->logout(); in an eval(). But then global/header.html.tmpl, which is called in all cases, tries to get all custom fields via global/field-descs.none.html, generating an unwanted SQL query. The footer of pages also tries to display your saved searches, which we should prevent (as you are logged out in all cases when Bugzilla is down). So I guess there are some places where we should write |IF NOT Param("shutdownhtml")|. This would be nice to have for Bugzilla 3.2.
Bogus error messages are bad for the user experience, especially when we know (because shutdownhtml is set) that the site is supposed to be down anyway. This bit us on bmo tonight while we were moving Bugzilla to a new DB.
Severity: enhancement → major
Whiteboard: [wanted b.m.o]
Whiteboard: [wanted b.m.o] → [wanted-bmo]
Priority: -- → P2
Target Milestone: --- → Bugzilla 4.0
Attached patch patch, v1Splinter Review
Tested; works fine.
Assignee: administration → LpSolit
Status: NEW → ASSIGNED
Attachment #339574 - Flags: review?(mkanat)
Attachment #339574 - Flags: review?(justdave)
Flags: testcase?
Target Milestone: Bugzilla 4.0 → Bugzilla 3.2
Attachment #339574 - Flags: review?(mkanat)
Attachment #339574 - Flags: review?(justdave)
Attachment #339574 - Flags: review+
Comment on attachment 339574 [details] [diff] [review] patch, v1 Looks fine. :-)
Flags: approval3.2+
Flags: approval+
tip: Checking in Bugzilla.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla.pm,v <-- Bugzilla.pm new revision: 1.68; previous revision: 1.67 done Checking in template/en/default/global/common-links.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/global/common-links.html.tmpl,v <-- common-links.html.tmpl new revision: 1.16; previous revision: 1.15 done Checking in template/en/default/global/field-descs.none.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/global/field-descs.none.tmpl,v <-- field-descs.none.tmpl new revision: 1.29; previous revision: 1.28 done 3.2rc1: Checking in Bugzilla.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla.pm,v <-- Bugzilla.pm new revision: 1.65.2.2; previous revision: 1.65.2.1 done Checking in template/en/default/global/common-links.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/global/common-links.html.tmpl,v <-- common-links.html.tmpl new revision: 1.14.2.1; previous revision: 1.14 done Checking in template/en/default/global/field-descs.none.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/global/field-descs.none.tmpl,v <-- field-descs.none.tmpl new revision: 1.25.2.2; previous revision: 1.25.2.1 done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Keywords: relnote
Resolution: --- → FIXED
Added to release notes for 3.2 in bug 463244.
Keywords: relnote
Flags: testcase?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: