If mysql is configured to use the ndb engine a karmic upgrade should keep mysql-dfsg-5.0 and remove the mysql-server package

Bug #450837 reported by Mathias Gug
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Medium
Michael Vogt
Karmic
Fix Released
Medium
Michael Vogt

Bug Description

Binary package hint: update-manager

During the Karmic release cycle, MySQL has been updated from 5.0 to 5.1 in main. That means that the mysql-server binary package is now depending on mysql-server-5.1 instead of mysql-server-5.0. update-manager already supports upgrading mysql-server from 5.0 to 5.1 - see bug 413789.

However there is one use case where the upgrade should not be done. If mysql-server is setup as part of a MySQL cluster (ndb engine), the system should not be upgraded to 5.1. Instead the mysql-server binary package should be removed (as it would pull 5.1 in) and 5.0 should be upgraded instead (which is in universe in karmic).

There is already a check in mysql-server-5.1.preinst script that tests if the ndb engine ise used. If so it aborts the upgrade by printing a message:

# Abort if an NDB cluster is in use.
if egrep -qi -r '^[^#]*ndb.connectstring|^[:space:]*\[[:space:]*ndb_mgmd' /etc/mysql/; then
  db_fset mysql-server/no_upgrade_when_using_ndb seen false || true
  db_input high mysql-server/no_upgrade_when_using_ndb || true
  db_go
  db_stop
  exit 1
fi

Removing mysql-server should be done before an upgrade is performed.

Mathias Gug (mathiaz)
Changed in update-manager (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in update-manager (Ubuntu Karmic):
assignee: nobody → Michael Vogt (mvo)
Michael Vogt (mvo)
Changed in update-manager (Ubuntu Karmic):
milestone: none → ubuntu-9.10
Revision history for this message
Mathias Gug (mathiaz) wrote :

Here is an example configuration file for the sql and data nodes:

# Options for mysqld process:
[mysqld]
ndbcluster # run NDB storage engine
ndb-connectstring=192.168.0.10 # location of management server

# Options for ndbd process:
[mysql_cluster]
ndb-connectstring=192.168.0.10 # location of management server

Revision history for this message
Mathias Gug (mathiaz) wrote :

Here is an example of the configuration file for the mgmt node (/etc/mysql/config.ini):

# Options affecting ndbd processes on all data nodes:
[ndbd default]
NoOfReplicas=2 # Number of replicas
DataMemory=80M # How much memory to allocate for data storage
IndexMemory=18M # How much memory to allocate for index storage
                  # For DataMemory and IndexMemory, we have used the
                  # default values. Since the "world" database takes up
                  # only about 500KB, this should be more than enough for
                  # this example Cluster setup.

# TCP/IP options:
[tcp default]
portnumber=2202 # This the default; however, you can use any
                  # port that is free for all the hosts in the cluster
                  # Note: It is recommended beginning with MySQL 5.0 that
                  # you do not specify the portnumber at all and simply allow
                  # the default value to be used instead

# Management process options:
[ndb_mgmd]
hostname=192.168.0.10 # Hostname or IP address of MGM node
datadir=/var/lib/mysql-cluster # Directory for MGM node log files

# Options for data node "A":
[ndbd]
                                # (one [ndbd] section per data node)
hostname=192.168.0.30 # Hostname or IP address
datadir=/usr/local/mysql/data # Directory for this data node's data files

# Options for data node "B":
[ndbd]
hostname=192.168.0.40 # Hostname or IP address
datadir=/usr/local/mysql/data # Directory for this data node's data files

# SQL node options:
[mysqld]
hostname=192.168.0.20 # Hostname or IP address
                                # (additional mysqld connections can be
                                # specified for this node for various
                                # purposes such as running ndb_restore)

Revision history for this message
Mathias Gug (mathiaz) wrote :

Both examples can be found in the Mysql Cluster documentation at http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster-multi-config.html

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:0.126.4

---------------
update-manager (1:0.126.4) karmic; urgency=low

  * DistUpgrade/DistUpgradeController.py:
    - fix running under ssh detection
  * DistUpgrade/DistUpgradeQuirks.py:
    - add check if NBD clustering is in use in mysql server
      and do not upgrade to 5.1 is it is (LP: #450837)
  * DistUpgrade/DistUpgrade.cfg:
    - remove mysql-server rule, this is now done in the above
      quirks handler
  * DistUpgrade/DistUpgradeController.py:
    - do not do list cleanup so that cancel restores all of the
      previous state. the cleanup will be done later by the apt
      cron job

 -- Michael Vogt <email address hidden> Thu, 15 Oct 2009 23:36:49 +0200

Changed in update-manager (Ubuntu Karmic):
status: Triaged → Fix Released
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.