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)
Tracking
()
RESOLVED
FIXED
Bugzilla 3.2
People
(Reporter: LpSolit, Assigned: LpSolit)
Details
(Whiteboard: [wanted-bmo])
Attachments
(1 file)
2.68 KB,
patch
|
mkanat
:
review+
|
Details | Diff | Splinter Review |
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.
Comment 1•17 years ago
|
||
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]
Updated•17 years ago
|
Whiteboard: [wanted b.m.o] → [wanted-bmo]
![]() |
Assignee | |
Updated•16 years ago
|
Priority: -- → P2
Target Milestone: --- → Bugzilla 4.0
![]() |
Assignee | |
Comment 2•16 years ago
|
||
Tested; works fine.
Assignee: administration → LpSolit
Status: NEW → ASSIGNED
Attachment #339574 -
Flags: review?(mkanat)
Attachment #339574 -
Flags: review?(justdave)
![]() |
Assignee | |
Updated•16 years ago
|
Flags: testcase?
Target Milestone: Bugzilla 4.0 → Bugzilla 3.2
Updated•16 years ago
|
Attachment #339574 -
Flags: review?(mkanat)
Attachment #339574 -
Flags: review?(justdave)
Attachment #339574 -
Flags: review+
Comment 3•16 years ago
|
||
Comment on attachment 339574 [details] [diff] [review]
patch, v1
Looks fine. :-)
Updated•16 years ago
|
Flags: approval3.2+
Flags: approval+
![]() |
Assignee | |
Comment 4•16 years ago
|
||
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
![]() |
Assignee | |
Updated•13 years ago
|
Flags: testcase?
You need to log in
before you can comment on or make changes to this bug.
Description
•