postinst does not print a helpful message when the server will fail to start
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-5.7 (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Robie Basak |
Bug Description
[Impact]
A common cause of upgrade failures are invalid configuration directives due to deprecation. In this kind of case, apport does not currently tell us the failure reason, and even if it did print a service start failure, the actual reason has to be dug out of the logs. Further, some users have a very old conffile that did not log output to the current location, so the real reason isn't always submitted in a bug report.
We can ask if mysqld will start by using: "mysqld --verbose --help --innodb-read-only 2>&1 > /dev/null". The postinst should do this so that it can fail early with a more useful error message.
This is fixed in Yakkety already (http://
Also see bug 1596056 and bug 1571865. Fixing each of these will improve the situation in a different way. Fixing all three bugs would catch the most failure cases and be the most helpful.
mysqld --verbose --help doesn't currently catch all such issues (it returns 0 if datadir doesn't exist, for instance), but should be a help
[Test Case]
* Install previous version of MySQL (e.g. 5.5. in Trusty)
* Add something like 'invalid_
* Upgrade to Xenial and MySQL 5.7
Expected behavior:
A helpful error pointing to invalid_
Actual behavior:
'subprocess installed post-installation script returned error exit status 1'
[Regression Potential]
Should there be any non-fatal issue that actually causes mysqld --verbose --help to fail but not the normal server startup to fail, the check will incorrectly cause installation to fail.
Changed in mysql-5.7 (Ubuntu Xenial): | |
status: | New → In Progress |
assignee: | nobody → Robie Basak (racb) |
description: | updated |
Changed in mysql-5.7 (Ubuntu Xenial): | |
milestone: | none → xenial-updates |
milestone: | xenial-updates → ubuntu-16.04.1 |
description: | updated |
Uploaded to Xenial. SRU team: you may find it easier to review if you verify my uploaded delta is the same as https:/ /git.launchpad. net/~racb/ ubuntu/ +source/ mysql-5. 7/log/? h=mysql- 5.7/ubuntu/ xenial and then use that.