[debian-mysql] Bug#435165: mysql-server-5.0: Clearly note we don't support multi-instances by duplicating init script

Dan Munckton munckfish at gmail.com
Sun Jul 29 19:24:46 UTC 2007


Package: mysql-server-5.0
Version: 5.0.45-1
Severity: minor

This is the result of the bug reported in Ubuntu. Raised here to pass
the debdiff upstream to Debian.

https://bugs.launchpad.net/ubuntu/+source/mysql-dfsg-5.0/+bug/106244

A user reported that they were trying to run multiple instances of
mysqld by duplicating the init script and changing the value of the CONF
variable within it to point to another configuration file. They raised
the bug in Ubuntu because the /etc/mysql/my.cnf is hard coded in a lot
of the startup scripts, and prevented them from easily running
multi-instances in this way.

After some analysis and discussion with mathiaz and infinity from the
ubuntu-server team it was agreed that we cannot properly support
multi-instances in this way because the maintainer scripts are not
designed to deal with this situation and could therefore lead to
problems on package upgrade/removal. Instead the proper way to do things 
would seem to be to use mysqld_multi.

A patch has been prepared which clearly comments the CONF variable
stating that multi-instances are not supported in this way, and removes
some of the hard-coded instances of '/etc/mysql/my.cnf' for the sake of
tidyness.

(This is my first bug report to the Debian BTS sorry if there are any
slip-ups).


-- System Information:
Debian Release: 4.0
  APT prefers feisty-updates
  APT policy: (500, 'feisty-updates'), (500, 'feisty-security'), (500, 'feisty-backports'), (500, 'feisty')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.20-16-generic
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
-------------- next part --------------
diff -u mysql-dfsg-5.0-5.0.45/debian/changelog mysql-dfsg-5.0-5.0.45/debian/changelog
--- mysql-dfsg-5.0-5.0.45/debian/changelog
+++ mysql-dfsg-5.0-5.0.45/debian/changelog
@@ -1,3 +1,14 @@
+mysql-dfsg-5.0 (5.0.45-1ubuntu1) gutsy; urgency=low
+
+  * debian/mysql-server-5.0.mysql.init: modified to
+    - Clearly indicate that we do not support running multiple instances  
+      of mysqld by duplicating the init script.
+    - Properly parameterized all existing references to the mysql config
+      file (/etc/mysql/my.cnf). 
+    (Fixes LP: #106244) 
+
+ -- Dan Munckton <munckfish at gmail.com>  Fri, 27 Jul 2007 23:58:20 +0100
+
 mysql-dfsg-5.0 (5.0.45-1) unstable; urgency=low
 
   * New upstream release.
diff -u mysql-dfsg-5.0-5.0.45/debian/mysql-server-5.0.mysql.init mysql-dfsg-5.0-5.0.45/debian/mysql-server-5.0.mysql.init
--- mysql-dfsg-5.0-5.0.45/debian/mysql-server-5.0.mysql.init
+++ mysql-dfsg-5.0-5.0.45/debian/mysql-server-5.0.mysql.init
@@ -21,8 +21,11 @@
 
 . /lib/lsb/init-functions
 
-SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
+# NOTE: Copying this script and changing the CONF variable here isn't
+# enough to run multiple instances of mysqld. Debian/Ubuntu doesn't 
+# currently support such a configuration out of the box.
 CONF=/etc/mysql/my.cnf
+SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
 MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
 
 # priority can be overriden and "-s" adds output to stderr
@@ -51,9 +54,9 @@
 ## Do some sanity checks before even trying to start mysqld.
 sanity_checks() {
   # check for config file
-  if [ ! -r /etc/mysql/my.cnf ]; then
-    log_warning_msg "$0: WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz"
-    echo                "WARNING: /etc/mysql/my.cnf cannot be read. See README.Debian.gz" | $ERR_LOGGER
+  if [ ! -r "$CONF" ]; then
+    log_warning_msg "$0: WARNING: $CONF cannot be read. See README.Debian.gz"
+    echo                "WARNING: $CONF cannot be read. See README.Debian.gz" | $ERR_LOGGER
   fi
 
   # check for buggy options
diff -u mysql-dfsg-5.0-5.0.45/debian/control mysql-dfsg-5.0-5.0.45/debian/control
--- mysql-dfsg-5.0-5.0.45/debian/control
+++ mysql-dfsg-5.0-5.0.45/debian/control
@@ -1,7 +1,8 @@
 Source: mysql-dfsg-5.0
 Section: misc
 Priority: optional
-Maintainer: Debian MySQL Maintainers <pkg-mysql-maint at lists.alioth.debian.org>
+Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss at lists.ubuntu.com>
+XSBC-Original-Maintainer: Debian MySQL Maintainers <pkg-mysql-maint at lists.alioth.debian.org>
 Uploaders:  Christian Hammers <ch at debian.org>, Sean Finney <seanius at debian.org>, Adam Conrad <adconrad at 0c3.net>
 Build-Depends: libtool (>= 1.4.2-7), procps | hurd,  debhelper (>= 4.1.16), file (>= 3.28-1), libncurses5-dev (>= 5.0-6), perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3), zlib1g-dev (>= 1:1.1.3-5), libreadline5-dev | libreadline-dev, psmisc, po-debconf, chrpath, automake1.9, doxygen, texlive-latex-base, gs, dpatch, gawk, bison, linux-libc-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64]
 Standards-Version: 3.7.2


More information about the pkg-mysql-maint mailing list