postinst is fragile, hanging on error

Bug #1567701 reported by Robie Basak
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mysql-5.7 (Ubuntu)
Triaged
Low
Unassigned

Bug Description

See bug 1567695. In 5.7.11-0ubuntu4 (and ubuntu5), we're using mysqld --init-file with a SHUTDOWN at the end. But it seems that if a previous command fails, the SHUTDOWN never runs and the postinst hangs.

Is there a better way to do this so that the postinst will correctly fail on an SQL command error, instead of hanging?

Revision history for this message
Lars Tangvald (lars-tangvald) wrote :

Will look into this some more.
Some of the more fragile commands (setting the auth_socket plugin is prone to this if installing the plugin fails for some reason) could be run using a normal client instead.

Revision history for this message
Lars Tangvald (lars-tangvald) wrote :

One way of solving this is to run the commands inside a created procedure which defines a no-op exception handler. But init-file + procedures are very picky about syntax, so making a general solution is tricky.

Revision history for this message
Robie Basak (racb) wrote :

We no longer have a use case where this actually fails, so let's put it in the backlog but not important to users to fix right now.

Changed in mysql-5.7 (Ubuntu):
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.