Public bug reported: [I think this might be a bug. Copied from http://serverfault.com/questions/291003/mysql-upstart-job-hangs-if- database-directory-not-mounted ]
I have mysqld pointed to an external volume: $ cat /etc/mysql/conf.d/data_joliss.cnf [mysqld] datadir=/mnt/data_joliss/mysql 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_joliss/mysql/opinionated-programmer.lower-test 110716 14:17:42 [Warning] Can't create test file /mnt/data_joliss/mysql/opinionated-programmer.lower-test mysqld: Can't change dir to '/mnt/data_joliss/mysql/' (Errcode: 2) 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://gist.github.com/1086397 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-core-5.1: Installed: 5.1.54-1ubuntu4 Candidate: 5.1.54-1ubuntu4 Version table: *** 5.1.54-1ubuntu4 0 500 http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ natty/main i386 Packages 100 /var/lib/dpkg/status ProblemType: Bug DistroRelease: Ubuntu 11.04 Package: upstart 0.9.7-1 ProcVersionSignature: Ubuntu 2.6.38-8.42-virtual 2.6.38.2 Uname: Linux 2.6.38-8-virtual i686 Architecture: i386 Date: Mon Jul 18 17:13:55 2011 Ec2AMI: ami-06ad526f Ec2AMIManifest: (unknown) Ec2AvailabilityZone: us-east-1a 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) ** Affects: mysql-5.1 (Ubuntu) Importance: Undecided Status: New ** Tags: apport-bug ec2-images i386 natty -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/812423 Title: mysql upstart job hangs if database directory not mounted To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mysql-5.1/+bug/812423/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs