Merge ~kstenerud/ubuntu/+source/mysql-5.7:cosmic-mysql-frozen-1799763 into ubuntu/+source/mysql-5.7:ubuntu/cosmic-devel
Status: | Merged |
---|---|
Merge reported by: | Robie Basak |
Merged at revision: | c6a8d94e1bd2334eef88faa32d28de4992a6e918 |
Proposed branch: | ~kstenerud/ubuntu/+source/mysql-5.7:cosmic-mysql-frozen-1799763 |
Merge into: | ubuntu/+source/mysql-5.7:ubuntu/cosmic-devel |
Diff against target: |
82 lines (+25/-5) 4 files modified
debian/additions/mysql-systemd-start (+4/-0) debian/changelog (+11/-0) debian/mysql-server-5.7.postinst (+3/-2) debian/mysql-server-5.7.preinst (+7/-3) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robie Basak | Approve | ||
Canonical Server | Pending | ||
Review via email: mp+358234@code.launchpad.net |
Description of the change
This patch fixes frozen state handling in MySQL:
- Do not proceed in preinst if already in frozen state to prevent daemon
stop if it had been started manually.
- Log to syslog via logger to increase visibility of the problem.
- Prevent systemd service start when in frozen state.
PPA: ppa:kstenerud/
Steps to test:
# lxc launch ubuntu:cosmic tester
# lxc exec tester bash
# apt update
# apt dist-upgrade -y
# apt install -y mysql-server
# apt remove -y mysql-server
# apt install -y mariadb-server
# apt remove -y mariadb-server
# apt install -y mysql-server
Pop up window:
Automatic maintenance of MySQL server daemon disabled
Packaging maintainer scripts detected a case that it does not know how to handle and cannot continue configuring MySQL. Automatic management of your MySQL installation has been disabled to allow other packaging tasks to complete. For more details, see /etc/mysql/FROZEN.
Console:
Packaging maintenance of MySQL will stop and the daemon disabled to prevent damage to your system.
For help, see /etc/mysql/FROZEN
# journalctl -xe
(nothing in the journal)
#service mysql start
(starts successfully when it should error out)
-------
# lxc launch ubuntu:cosmic tester-fix
# lxc exec tester-fix bash
# add-apt-repository -y ppa:kstenerud/
# apt update
# apt dist-upgrade -y
# apt install -y mysql-server
# apt remove -y mysql-server
# apt install -y mariadb-server
# apt remove -y mariadb-server
# apt install -y mysql-server
Pop up window:
Automatic maintenance of MySQL server daemon disabled
Packaging maintainer scripts detected a case that it does not know how to handle and cannot continue configuring MySQL. Automatic management of your MySQL installation has been disabled to allow other packaging tasks to complete. For more details, see /etc/mysql/FROZEN.
Console:
MySQL has been frozen to prevent damage to your system. Please see /etc/mysql/FROZEN for help.
# journalctl -xe
Nov 02 10:36:28 tester /etc/init.
# service mysql start
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
# journalctl -xe
Nov 02 10:37:31 tester mysql-systemd-
Nov 02 10:37:31 tester systemd[1]: mysql.service: Control process exited, code=exited status=1
Nov 02 10:37:31 tester systemd[1]: mysql.service: Failed with result 'exit-code'.
Nov 02 10:37:31 tester systemd[1]: Failed to start MySQL Community Server.
Package Tests:
autopkgtest [14:42:05]: test upstream: -------
autopkgtest [14:42:05]: test upstream: - - - - - - - - - - results - - - - - - - - - -
upstream PASS
autopkgtest [14:42:06]: @@@@@@@
smoke PASS
upstream PASS
Looks good, thanks!
This is fine to upload to Ubuntu, but it will save future work if we could land it in VCS on Salsa directly. Did you get anywhere with getting a merge request filed there please?