Update MySQL packages #83

Closed
opened 2019-07-26 13:40:55 +00:00 by raucao · 4 comments
Owner

See #82 for more details. They are currently pinned to a specific version.

See #82 for more details. They are currently pinned to a specific version.
greg self-assigned this 2019-07-29 10:47:58 +00:00
Owner

The apt preferences files you created are being ignored because of their name (apt thinks .7 is the extension, so they would need to end with .pref). Here's the manpage

$ sudo apt update
[snip]
N: Ignoring file 'mysql-client-core-5.7' in directory '/etc/apt/preferences.d/' as it has an invalid filename extension
N: Ignoring file 'mysql-client-5.7' in directory '/etc/apt/preferences.d/' as it has an invalid filename extension
N: Ignoring file 'mysql-server-core-5.7' in directory '/etc/apt/preferences.d/' as it has an invalid filename extension
N: Ignoring file 'mysql-server-5.7' in directory '/etc/apt/preferences.d/' as it has an invalid filename extension

The mysql packages were updated again on Saturday (/var/log/unattended-upgrades/unattended-upgrades-dpkg.log), but this time the mysql service did not restart, so nothing broke

$ sudo systemctl status mysql.service
[snip]
Active: active (running) since Fri 2019-07-26 13:24:16 UTC; 2 days ago
[snip]

I'm trying to make sense of the logs from Friday when it broke after the update (/var/log/mysql/error.log.3.gz), however there are no errors in them, just the daemon shutting down right after starting

The apt preferences files you created are being ignored because of their name (apt thinks .7 is the extension, so they would need to end with .pref). Here's the [manpage](https://manpages.debian.org/jessie/apt/apt_preferences.5.en.html) ``` $ sudo apt update [snip] N: Ignoring file 'mysql-client-core-5.7' in directory '/etc/apt/preferences.d/' as it has an invalid filename extension N: Ignoring file 'mysql-client-5.7' in directory '/etc/apt/preferences.d/' as it has an invalid filename extension N: Ignoring file 'mysql-server-core-5.7' in directory '/etc/apt/preferences.d/' as it has an invalid filename extension N: Ignoring file 'mysql-server-5.7' in directory '/etc/apt/preferences.d/' as it has an invalid filename extension ``` The mysql packages were updated again on Saturday (`/var/log/unattended-upgrades/unattended-upgrades-dpkg.log`), but this time the mysql service did not restart, so nothing broke ``` $ sudo systemctl status mysql.service [snip] Active: active (running) since Fri 2019-07-26 13:24:16 UTC; 2 days ago [snip] ``` I'm trying to make sense of the logs from Friday when it broke after the update (`/var/log/mysql/error.log.3.gz`), however there are no errors in them, just the daemon shutting down right after starting
Owner

On andromeda there is a /etc/systemd/system/mysql.service file that was created by Chef, on a fresh VM the service is provided by the package and is located at /lib/systemd/system/mysql.service. So it looks like an issue caused by past versions of the mysql cookbook

Installing the mysql-server-5.7 package again and disabling the /etc/systemd/system/mysql.service service should do the trick. I'm going to announce on IRC/XMPP that the wiki might go down for a bit

On andromeda there is a `/etc/systemd/system/mysql.service` file that was created by Chef, on a fresh VM the service is provided by the package and is located at `/lib/systemd/system/mysql.service`. So it looks like an issue caused by past versions of the mysql cookbook Installing the `mysql-server-5.7` package again and disabling the `/etc/systemd/system/mysql.service` service should do the trick. I'm going to announce on IRC/XMPP that the wiki might go down for a bit
Owner

I have managed to update mysql-server-5.7, after stopping /etc/systemd/system/mysql.service, moving it, running systemctl daemon-reload.

I had to temporarily add the UNIX socket /run/mysql/mysqld.pid to the /var/www/mediawiki-1.32.0/LocalSettings.php, because the config in /etc/mysql was also generated by an old version of the mysql cookbook, and that set the UNIX socket to the non-standard /run/mysql/mysqld.pid. The one set by the mysql package is /var/run/mysqld/mysqld.sock, that is a default known by Mediawiki and other apps. So now the final step is to restore the initial config from the packages

I have managed to update mysql-server-5.7, after stopping `/etc/systemd/system/mysql.service`, moving it, running `systemctl daemon-reload`. I had to temporarily add the UNIX socket `/run/mysql/mysqld.pid` to the `/var/www/mediawiki-1.32.0/LocalSettings.php`, because the config in `/etc/mysql` was also generated by an old version of the mysql cookbook, and that set the UNIX socket to the non-standard `/run/mysql/mysqld.pid`. The one set by the mysql package is `/var/run/mysqld/mysqld.sock`, that is a default known by Mediawiki and other apps. So now the final step is to restore the initial config from the packages
Owner

This is all done and working now.

I have restored the content of /etc/mysql, restarted the service, and restored the mysql config in /var/www/mediawiki-1.32.0/LocalSettings.php to what it was before (removed the :/run/mysql/mysqld.pid suffix from the $wgDBserver definition, setting it back to "localhost"). Also removed the valid (libmysqlclient20 & libmysqlclient-dev) and invalid (all the mysql-*-5.7) apt preferences

This is all done and working now. I have restored the content of `/etc/mysql`, restarted the service, and restored the mysql config in `/var/www/mediawiki-1.32.0/LocalSettings.php` to what it was before (removed the `:/run/mysql/mysqld.pid` suffix from the `$wgDBserver` definition, setting it back to "localhost"). Also removed the valid (libmysqlclient20 & libmysqlclient-dev) and invalid (all the mysql-*-5.7) apt preferences
greg closed this issue 2019-07-29 13:41:22 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kosmos/chef#83
No description provided.