mysql upstart job hangs if database directory not mounted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mysql-5.1 (Ubuntu) |
New
|
Low
|
Unassigned | ||
mysql-5.5 (Ubuntu) |
New
|
Low
|
Unassigned |
Bug Description
[I think this might be a bug. Copied from http://
I have mysqld pointed to an external volume:
$ cat /etc/mysql/
[mysqld]
datadir=
This is working fine in general. But sometimes the volume is not mounted, for whatever reason. In those cases, mysqld fails like it should:
# mysqld
110716 14:17:42 [Warning] Can't create test file /mnt/data_
110716 14:17:42 [Warning] Can't create test file /mnt/data_
mysqld: Can't change dir to '/mnt/data_
110716 14:17:42 [ERROR] Aborting
110716 14:17:42 [Note] mysqld: Shutdown complete
However, the upstart job on Ubuntu 11.04 (`start mysql` or `service start mysql`) simply waits (hangs) indefinitely without outputting anything. The strace isn't telling me anything, but if anybody cares to take a look:
strace -fv start mysql => https:/
I would like the `mysql` upstart job to just report an error and terminate rather than hanging. How do I do this?
(Background: I have an EC2 instance with an extra EBS volume to store permanent data. If the EBS volume is not available at boot time, the system hangs waiting for mysql, and I cannot even SSH into it to fix the problem -- so now my instance has become completely unusable. I would like it to just continue booting, even without a MySQL server.)
----------------
Ubuntu 11.04 on EC2, ami-06ad526f
mysql-server-
Installed: 5.1.54-1ubuntu4
Candidate: 5.1.54-1ubuntu4
Version table:
*** 5.1.54-1ubuntu4 0
500 http://
100 /var/lib/
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: upstart 0.9.7-1
ProcVersionSign
Uname: Linux 2.6.38-8-virtual i686
Architecture: i386
Date: Mon Jul 18 17:13:55 2011
Ec2AMI: ami-06ad526f
Ec2AMIManifest: (unknown)
Ec2Availability
Ec2InstanceType: t1.micro
Ec2Kernel: aki-407d9529
Ec2Ramdisk: unavailable
ExecutablePath: /sbin/initctl
ProcEnviron:
SHELL=/bin/bash
PATH=(custom, user)
LC_COLLATE=POSIX
LANG=en_US.UTF-8
LC_TIME=POSIX
SourcePackage: upstart
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in mysql-5.1 (Ubuntu): | |
importance: | Undecided → Low |
Changed in mysql-5.5 (Ubuntu): | |
importance: | Undecided → Low |
Can you include your fstab?
It doesn't make much sense that the entire system would block on this, since mysql doesn't really start on any blocking events.