[Bug 1889472] Please test proposed package
Brian Murray
1889472 at bugs.launchpad.net
Tue Jun 22 20:17:03 UTC 2021
Hello Simon, or anyone else affected,
Accepted mysql-5.7 into bionic-proposed. The package will build now and
be available at
https://launchpad.net/ubuntu/+source/mysql-5.7/5.7.34-0ubuntu0.18.04.2
in a few hours, and then in the -proposed repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed. Your feedback will aid us getting this
update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
bionic to verification-done-bionic. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-bionic. In either case, without details of your testing we will
not be able to proceed.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance for helping!
N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1889472
Title:
mysql-server-5.7 postinst fails when in read-only mode
Status in mysql-5.7 source package in Xenial:
Won't Fix
Status in mysql-5.7 source package in Bionic:
Fix Committed
Bug description:
[Impact]
Updates of the mysql-server-5.7 package fail to install (error during postinst) if operating in (super) read-only mode.
A read-only replica is common in redundant/HA setups.
[Test Case]
1) Setup a container (bionic or xenial would do)
$ lxc launch images:ubuntu/bionic sql1
$ lxc shell sql1
# apt-get update && apt-get install -y --no-install-recommends mysql-server
2) Configure read-only mode
# cat << EOF >> /etc/mysql/my.cnf
[mysqld]
super_read_only = ON
read_only = ON
EOF
# service mysql restart
# mysql -e "SELECT @@global.read_only, @@global.super_read_only;"
+--------------------+--------------------------+
| @@global.read_only | @@global.super_read_only |
+--------------------+--------------------------+
| 1 | 1 |
+--------------------+--------------------------+
3) Trigger the postinst code
# apt-get install --reinstall mysql-server-5.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/2,931 kB of archives.
After this operation, 0 B of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 16169 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.7_5.7.31-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-server-5.7 (5.7.31-0ubuntu0.18.04.1) over (5.7.31-0ubuntu0.18.04.1) ...
Setting up mysql-server-5.7 (5.7.31-0ubuntu0.18.04.1) ...
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
mysql_upgrade: [ERROR] 1290: The MySQL server is running with the --super-read-only option so it cannot execute this statement
mysql_upgrade failed with exit status 5
dpkg: error processing package mysql-server-5.7 (--configure):
installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1
Processing triggers for systemd (237-3ubuntu10.41) ...
Errors were encountered while processing:
mysql-server-5.7
E: Sub-process /usr/bin/dpkg returned an error code (1)
Step 3) should not cause a dpkg error.
[Regression Potential]
This patch runs a MySQL query to check if the service is in (super) read-only mode before calling mysql_upgrade. The SQL query might
fail thus preventing the proper detection of the read-only mode. The patch assumes read-write mode by default so that it would still
call mysql_upgrade. Fortunately, mysql_upgrade is known to safely error out when in read-only as this is what the bug is about.
Another possibility is to wrongly detect read-only mode which would skip running mysql_upgrade when it should have been. To mitigate
this, the patch informs the user ("mysql_upgrade skipped due to (super) read-only mode") who could then run mysql_upgrade manually.
[Other Info]
If and when the patch lands in -proposed, I will update the test
instructions to indicate that -proposed needs to be enabled and mysql-
server-* should be upgraded instead of --reinstall'ed.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/xenial/+source/mysql-5.7/+bug/1889472/+subscriptions
More information about the Ubuntu-sponsors
mailing list