Merge ~lvoytek/ubuntu/+source/mysql-8.0:mysql-fix-lp1899248-socket-folder-jammy into ubuntu/+source/mysql-8.0:ubuntu/devel

Proposed by Lena Voytek
Status: Merged
Merge reported by: Lena Voytek
Merged at revision: c720d6368b0d270d540fe7b64ea52f68be080821
Proposed branch: ~lvoytek/ubuntu/+source/mysql-8.0:mysql-fix-lp1899248-socket-folder-jammy
Merge into: ubuntu/+source/mysql-8.0:ubuntu/devel
Diff against target: 36 lines (+14/-3)
2 files modified
debian/changelog (+11/-0)
debian/mysql-server-8.0.postinst (+3/-3)
Reviewer Review Type Date Requested Status
Bryce Harrington (community) Approve
Canonical Server packageset reviewers Pending
Canonical Server Core Reviewers Pending
Review via email: mp+414368@code.launchpad.net

Description of the change

PPA: ppa:lvoytek/mysql-8.0-fix-socket-folder-jammy
**Note: SSL3 updates are needed for the package to build successfully in Jammy
Changes made to get the build working are shown in this commit: https://git.launchpad.net/~lvoytek/ubuntu/+source/mysql-8.0/commit/?id=1419087bcf34e9501a7858bd1e57739e449c2c1a

Steps to test:

# lxc launch images:ubuntu/jammy test-failure-jammy
# lxc exec test-failure-jammy bash

# apt update && apt dist-upgrade -y

# apt install -y mysql-server software-properties-common

- After the initial install mysqlx errors will show up in the error log
# grep mysqlx /var/log/mysql/error.log

2022-01-19T15:35:16.062702Z 0 [ERROR] [MY-011292] [Server] Plugin mysqlx reported: 'Preparation of I/O interfaces failed, X Protocol won't be accessible'
2022-01-19T15:35:16.062764Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.sock.lock'
2022-01-19T15:35:18.887116Z 0 [ERROR] [MY-011300] [Server] Plugin mysqlx reported: 'Setup of socket: '/var/run/mysqld/mysqlx.sock' failed, can't create lock file /var/run/mysqld/mysqlx.sock.lock'
...

- Clear the error log then upgrade to the ppa
# rm /var/log/mysql/error.log

# add-apt-repository ppa:lvoytek/mysql-8.0-fix-socket-folder-jammy
# apt update && apt upgrade -y

- Check the error log again to see that there were no mysqlx errors reported during the upgrade
# grep mysqlx /var/log/mysql/error.log

...

# exit

-The following can also be done in a new container to confirm the errors do not show up on initial install either
# lxc launch images:ubuntu/jammy test-success-jammy
# lxc exec test-success-jammy bash

# apt update && apt dist-upgrade -y

# apt install -y software-properties-common

# add-apt-repository ppa:lvoytek/mysql-8.0-fix-socket-folder-jammy

# apt install -y mysql-server

- After the initial install confirm no mysqlx errors show up in the error log
# grep mysqlx /var/log/mysql/error.log

...

To post a comment you must log in.
Revision history for this message
Bryce Harrington (bryce) wrote :

Changes look good, +1.

Regarding the note about ssl3, are those changes required for landing this in jammy? If so, should they also be included in this MP?

Otherwise, I can sponsor the upload to jammy if you're ready to go.

review: Approve
Revision history for this message
Lena Voytek (lvoytek) wrote :

> Changes look good, +1.
>
> Regarding the note about ssl3, are those changes required for landing this in
> jammy? If so, should they also be included in this MP?
>
> Otherwise, I can sponsor the upload to jammy if you're ready to go.

The ssl3 changes are needed for mysql to build in general in jammy, but are not required for this change specifically. The ssl3 changes included in the ppa are still being worked on by Robie so they shouldn't be used yet. If its okay that the build fails in proposed due to ssl3 for now then it is alright to upload. Otherwise we can hold off until those changes are complete.

Thanks!

Revision history for this message
Bryce Harrington (bryce) wrote :

Aha, thanks for the explanation, yes that makes sense.

In general its probably fine to upload changes even though the build is known to be broken, although it is more ideal to aggregate changes together until a fix for the build is available. I'm fine either way, but maybe let's wait and touch base with Robie tomorrow. At the least he'll need to rebase his work to include this, or may prefer aggregation.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 1cd8b3f..a4193fc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
1mysql-8.0 (8.0.27-0ubuntu0.22.04.1) jammy; urgency=medium
2
3 * d/mysql-server-8.0.postinst: Create and add correct permissions to the mysql
4 socket directory before running mysqld post-update.
5 This fixes the issue where, upon install or update, mysql will crash and ask
6 to report an error with the contents: "failed to install/upgrade: can't create
7 lock file /var/run/mysqld/mysqlx.sock.lock"
8 (LP: #1899248)
9
10 -- Lena Voytek <lena.voytek@canonical.com> Wed, 19 Jan 2022 08:26:58 -0700
11
1mysql-8.0 (8.0.27-0ubuntu0.21.10.2) jammy; urgency=medium12mysql-8.0 (8.0.27-0ubuntu0.21.10.2) jammy; urgency=medium
213
3 * No-change rebuild against libssl314 * No-change rebuild against libssl3
diff --git a/debian/mysql-server-8.0.postinst b/debian/mysql-server-8.0.postinst
index 05e2122..42c1eea 100755
--- a/debian/mysql-server-8.0.postinst
+++ b/debian/mysql-server-8.0.postinst
@@ -190,9 +190,9 @@ case "$1" in
190 # variants in Ubuntu.190 # variants in Ubuntu.
191 /usr/share/mysql-common/configure-symlinks install mysql "$mysql_cfgdir/mysql.cnf"191 /usr/share/mysql-common/configure-symlinks install mysql "$mysql_cfgdir/mysql.cnf"
192192
193 # Ensure the existence and right permissions for the database and193 # Ensure the existence and right permissions for the database, socket
194 # log files.194 # folder, and log files.
195 for d in $mysql_statedir $mysql_filesdir $mysql_keyringdir $mysql_logdir195 for d in $mysql_statedir $mysql_filesdir $mysql_keyringdir $mysql_logdir $mysql_rundir
196 do196 do
197 if [ ! -d "$d" -a ! -L "$d" ]; then mkdir "$d"; fi197 if [ ! -d "$d" -a ! -L "$d" ]; then mkdir "$d"; fi
198 chown -R mysql:mysql $d198 chown -R mysql:mysql $d

Subscribers

People subscribed via source and target branches