This bug was fixed in the package cluster-agents - 1:1.0.3-2ubuntu1.1

---------------
cluster-agents (1:1.0.3-2ubuntu1.1) lucid-proposed; urgency=low

  * debian/patches/mysql_move_writable_test.patch: Cherry-pick upstream
    commit (95a6eb8a).  In mysql OCF, properly create $pid_dir before testing
    permissions on it. (LP: #893352)
 -- Adam Gandelman <[email protected]>   Tue, 22 Nov 2011 11:20:06 -0800

** Changed in: cluster-agents (Ubuntu Lucid)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
High Availability Team, which is subscribed to cluster-agents in Ubuntu.
https://bugs.launchpad.net/bugs/893352

Title:
  mysql ocf script broken in 1:1.0.3-2ubuntu1 (lucid)

Status in “cluster-agents” package in Ubuntu:
  Fix Released
Status in “cluster-agents” source package in Lucid:
  Fix Released
Status in “cluster-agents” source package in Natty:
  Fix Released
Status in “cluster-agents” source package in Precise:
  Fix Released
Status in “cluster-agents” source package in Hardy:
  Invalid

Bug description:
  Due to ubuntu putting /var/run on a tempory fs the /var/run/mysqld directory 
is removed upon a reboot. Mysql will fail to start via the crm after next boot 
as it cannot access or find the the needed /var/run/mysqld directory.
  This directory is created in the OCF script in the mysql_start() function , 
but for some reason not until after the script checks for the directory and 
write permissions, logs an error, and exits. (Line 345)

  I have fixed it by merely moving the if statement which test -w the
  pid_dir to after the if statements which create the pid_dir (line 350)


  
  SRU Justification:
  [Impact]
  /var/run/mysqld directory is typically created by pre-start in the mysql 
upstart job prior to starting the service every boot, as /var/run is tempfs and 
its contents ephemeral.  Users of the Linux HA stack typically hand over 
control of specific services to the cluster managed by OCF scripts.  The OCF 
script to manage mysql should take the same steps the required directories are 
present.  A bug exists in the version of the mysql OCF script shipped in 
1:1.0.3-2ubuntu1 which prevents the required directories from being created if 
they do not exist.   If the clustered service is configured to use 
/var/run/mysqld (the ubuntu default for certain files), the cluster will fail 
to start mysql after a reboot.  As most users of the cluster agent anticipate a 
*highly* available service, graceful system reboots should not result in an 
unavailable service. 

  [Development Fix] 
  As Florian Hass pointed out, this has been fixed upstream over a year ago and 
is not present in the current development release (precise, package renamed 
resource agents 1:3.9.2-5ubuntu1)

  
  [Stable Fix]
  A trivial fix at 
https://github.com/ClusterLabs/resource-agents/commit/a1801207e0602d9b975f336569b562c195a6eb8a
 solves the issue and is easily backported.

  [Test Case]
  See http://paste.ubuntu.com/746339/ for a minimal test case which involves 
configuration of a 1-node heartbeat/pacemaker cluster.

  [Regression Potential]
  Minimal chance of regression.  Change simply ensures mysql directories exist 
before they are checked for write permissions.  The change only affects the 
mysql OCF agent, all others are untouched.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cluster-agents/+bug/893352/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-ha
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~ubuntu-ha
More help   : https://help.launchpad.net/ListHelp

Reply via email to