upgrade 14.04 to 15.04, mysql no longer starts on boot due to missing policykit-1

Bug #1450053 reported by Lee Revell
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.6 (Ubuntu)
Incomplete
High
Unassigned

Bug Description

Upgrade 14.04 to 14.10 to 15.04 via do-release upgrade. Upon booting 15.04 mysql no longer starts on boot.

Trying to enable it gives:

# systemctl enable mysql.service
Synchronizing state for mysql.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d mysql defaults
Executing /usr/sbin/update-rc.d mysql enable
Failed to execute operation: No such file or directory

strace revealed that the "no such file or directory" refers to /usr/bin/pkttyagent which is in policykit-1 package.

apt-get install policykit-1 and without making any other changes, mysql is back to working on boot.

There is a missing dependency on policykit-1 somewhere.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: ubuntu-release-upgrader-core 1:15.04.14
ProcVersionSignature: Ubuntu 3.16.0-34.47-generic 3.16.7-ckt8
Uname: Linux 3.16.0-34-generic x86_64
ApportVersion: 2.17.2-0ubuntu1
Architecture: amd64
CrashDB: ubuntu
Date: Wed Apr 29 10:18:17 2015
InstallationDate: Installed on 2015-03-02 (57 days ago)
InstallationMedia: Ubuntu 14.04.2 LTS "Trusty Tahr" - Release amd64 (20150218.1)
PackageArchitecture: all
ProcEnviron:
 TERM=screen
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubuntu-release-upgrader
UpgradeStatus: Upgraded to vivid on 2015-04-28 (0 days ago)

Revision history for this message
Lee Revell (rlrevell-k) wrote :
affects: ubuntu-release-upgrader (Ubuntu) → mysql-5.6 (Ubuntu)
Revision history for this message
Daniel Speichert (dasp) wrote :

Have the same problem but policykit-1 is installed and it doesn't fix the problem.

Revision history for this message
Nikolay (prorock66) wrote :

I have this problem too. The mysql.service are working but "systemctl enable mysql.service" returned an error.

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

Thank you for taking the time to report this bug and helping to make Ubuntu better. I'm not sure what is causing this. Your findings are helpful - I'll leave this bug open to look at it later. I wonder if recent systemd updates have fixed it though?

Notes for some other commenters:

> Have the same problem but policykit-1 is installed and it doesn't fix the problem.

Then you have a different problem. Please check it isn't bug 1447807 (which is fixed now) and file a separate bug as necessary.

> The mysql.service are working but "systemctl enable mysql.service" returned an error.

This sounds like bug 1447807 which has been fixed in systemd 219-7ubuntu5 now. Please update and try again.

Changed in mysql-5.6 (Ubuntu):
importance: Undecided → High
Revision history for this message
Martin Pitt (pitti) wrote :

I just tried to install mysql-server in a minimal vivid environment without policykit-1, and mysql.service starts fine right after installation.

I tried "systemctl stop mysql", "systemctl disable mysql", "systemctl enable mysql" without a problem. So I'm afraid I can't reproduce this yet.

Bug 1447807 was about a package which only had an init.d script without a systemd unit, but that's not the case here.

As a first step, can you please give me the output of

  systemctl status mysql.service
  sudo SYSTEMD_LOG_LEVEL=debug systemctl enable mysql

Thanks!

Changed in mysql-5.6 (Ubuntu):
status: New → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

Also, can you please attach the full strace? I have the feeling that policykit is a red herring here.

Revision history for this message
Lee Revell (rlrevell-k) wrote :

Here is the output of the systemctl enable.

I am not sure I still have the strace output from when it was failing. Are you saying you want the strace output now that I've got it to work? Or to remove policykit-1 and try to reproduce in the original state?

Revision history for this message
Lee Revell (rlrevell-k) wrote :

Output of the systemctl status

Revision history for this message
Martin Pitt (pitti) wrote :

> Are you saying you want the strace output now that I've got it to work? Or to remove policykit-1 and try to reproduce in the original state?

In the original broken state, please. If everything works, there's nothing to debug :-) However..

> Loaded: loaded (/etc/init.d/mysql)

This *is* unexpected. mysql-5.6 does have a native service file /lib/systemd/system/mysql.service. So it seems you are not actually running -5.6 here, but an older version, perhaps -5.5? So in that case this actually is a duplicate of bug 1447807. Can you please install updates and verify?

Revision history for this message
Lee Revell (rlrevell-k) wrote :

I install updates every day, the system is currently fully updated. FWIW I just remembered I am actually using MariaDB not mysql (this is an openstack controller node and that's their recommendation). Here are the packages installed:

openstack@controller-1:~$ dpkg -l | egrep -i mariadb\|mysql
ii libaprutil1-dbd-mysql:amd64 1.5.4-1 amd64 Apache Portable Runtime Utility Library - MySQL Driver
ii libdbd-mysql-perl 4.028-2 amd64 Perl5 database interface to the MySQL database
ii libmysqlclient18:amd64 5.6.24-0ubuntu2 amd64 MySQL database client library
ii mariadb-client-10.0 10.0.17-0ubuntu1 amd64 MariaDB database client binaries
ii mariadb-client-core-10.0 10.0.17-0ubuntu1 amd64 MariaDB database core client binaries
ii mariadb-common 10.0.17-0ubuntu1 all MariaDB common metapackage
ii mariadb-server 10.0.17-0ubuntu1 all MariaDB database server (metapackage depending on the latest version)
ii mariadb-server-10.0 10.0.17-0ubuntu1 amd64 MariaDB database server binaries
ii mariadb-server-core-10.0 10.0.17-0ubuntu1 amd64 MariaDB database core server files
ii mysql-common 5.6.24-0ubuntu2 all MySQL database common files, e.g. /etc/mysql/my.cnf
ii python-mysqldb 1.2.3-2ubuntu1 amd64 Python interface to MySQL

Revision history for this message
Martin Pitt (pitti) wrote :

Ah :) That explains it. I mark this as a duplicate then, please yell if it still happens with systemd 219-7ubuntu5.

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.