David Parker | 22 Aug 2012 20:49
Favicon

Issues with HA cluster for mysqld

Hello,

I'm trying to set up a 2-node, active-passive HA cluster for MySQL using 
heartbeat and Pacemaker.  The operating system is Debian Linux 6.0.5 
64-bit, and I am using the heartbeat packages installed via apt-get.  
The servers involved are the SQL nodes of a running MySQL cluster, so 
the only service I need HA for is the MySQL daemon (mysqld).

What I would like to do is have a single virtual IP address which 
clients use to query MySQL, and have the IP and mysqld fail over to the 
passive node in the event of a failure on the active node.  I have read 
through a lot of the heartbeat and Pacemaker documentation, and here are 
the resources I have configured for the cluster:

* A custom LSB script for mysqld (compliant with Pacemaker's 
requirements as outlined in the documentation)
* An iLO2-based STONITH device using riloe (both servers are HP Proliant 
DL380 G5)
* A virtual IP address for mysqld using IPaddr2

I believe I have configured everything correctly, but I'm not positive.  
Anyway, when I start heartbeat and pacemaker (/etc/init.d/heartbeat 
start), everything seems to be ok.  However, the virtual IP never comes 
up, and the output of "crm_resource -LV" indicates that something is wrong:

root <at> ha1:~# crm_resource -LV
crm_resource[28988]: 2012/08/22_14:41:23 WARN: unpack_rsc_op: Processing 
failed op stonith_start_0 on ha1: unknown error (1)
  stonith        (stonith:external/riloe) Started
  MysqlIP        (ocf::heartbeat:IPaddr2) Stopped
(Continue reading)

Jake Smith | 23 Aug 2012 15:01
Favicon

Re: Issues with HA cluster for mysqld


----- Original Message -----
> From: "David Parker" <dparker@...>
> To: pacemaker@...
> Sent: Wednesday, August 22, 2012 2:49:32 PM
> Subject: [Pacemaker] Issues with HA cluster for mysqld
> 
> Hello,
> 
> I'm trying to set up a 2-node, active-passive HA cluster for MySQL
> using
> heartbeat and Pacemaker.  The operating system is Debian Linux 6.0.5
> 64-bit, and I am using the heartbeat packages installed via apt-get.
> The servers involved are the SQL nodes of a running MySQL cluster, so
> the only service I need HA for is the MySQL daemon (mysqld).
> 
> What I would like to do is have a single virtual IP address which
> clients use to query MySQL, and have the IP and mysqld fail over to
> the
> passive node in the event of a failure on the active node.  I have
> read
> through a lot of the heartbeat and Pacemaker documentation, and here
> are
> the resources I have configured for the cluster:
> 
> * A custom LSB script for mysqld (compliant with Pacemaker's
> requirements as outlined in the documentation)
> * An iLO2-based STONITH device using riloe (both servers are HP
> Proliant
> DL380 G5)
(Continue reading)

David Parker | 23 Aug 2012 16:17
Favicon

Re: Issues with HA cluster for mysqld

On 08/23/2012 09:01 AM, Jake Smith wrote:
> ----- Original Message -----
>> From: "David Parker"<dparker@...>
>> To: pacemaker@...
>> Sent: Wednesday, August 22, 2012 2:49:32 PM
>> Subject: [Pacemaker] Issues with HA cluster for mysqld
>>
>> Hello,
>>
>> I'm trying to set up a 2-node, active-passive HA cluster for MySQL
>> using
>> heartbeat and Pacemaker.  The operating system is Debian Linux 6.0.5
>> 64-bit, and I am using the heartbeat packages installed via apt-get.
>> The servers involved are the SQL nodes of a running MySQL cluster, so
>> the only service I need HA for is the MySQL daemon (mysqld).
>>
>> What I would like to do is have a single virtual IP address which
>> clients use to query MySQL, and have the IP and mysqld fail over to
>> the
>> passive node in the event of a failure on the active node.  I have
>> read
>> through a lot of the heartbeat and Pacemaker documentation, and here
>> are
>> the resources I have configured for the cluster:
>>
>> * A custom LSB script for mysqld (compliant with Pacemaker's
>> requirements as outlined in the documentation)
>> * An iLO2-based STONITH device using riloe (both servers are HP
>> Proliant
>> DL380 G5)
(Continue reading)

David Parker | 23 Aug 2012 18:56
Favicon

Re: Issues with HA cluster for mysqld


On 08/23/2012 10:17 AM, David Parker wrote:
> On 08/23/2012 09:01 AM, Jake Smith wrote:
>> ----- Original Message -----
>>> From: "David Parker"<dparker@...>
>>> To: pacemaker@...
>>> Sent: Wednesday, August 22, 2012 2:49:32 PM
>>> Subject: [Pacemaker] Issues with HA cluster for mysqld
>>>
>>> Hello,
>>>
>>> I'm trying to set up a 2-node, active-passive HA cluster for MySQL
>>> using
>>> heartbeat and Pacemaker.  The operating system is Debian Linux 6.0.5
>>> 64-bit, and I am using the heartbeat packages installed via apt-get.
>>> The servers involved are the SQL nodes of a running MySQL cluster, so
>>> the only service I need HA for is the MySQL daemon (mysqld).
>>>
>>> What I would like to do is have a single virtual IP address which
>>> clients use to query MySQL, and have the IP and mysqld fail over to
>>> the
>>> passive node in the event of a failure on the active node.  I have
>>> read
>>> through a lot of the heartbeat and Pacemaker documentation, and here
>>> are
>>> the resources I have configured for the cluster:
>>>
>>> * A custom LSB script for mysqld (compliant with Pacemaker's
>>> requirements as outlined in the documentation)
>>> * An iLO2-based STONITH device using riloe (both servers are HP
(Continue reading)

Jake Smith | 23 Aug 2012 22:19
Favicon

Re: Issues with HA cluster for mysqld


----- Original Message -----
> From: "David Parker" <dparker@...>
> To: pacemaker@...
> Sent: Thursday, August 23, 2012 12:56:33 PM
> Subject: Re: [Pacemaker] Issues with HA cluster for mysqld
> 
> 
> On 08/23/2012 10:17 AM, David Parker wrote:
> > On 08/23/2012 09:01 AM, Jake Smith wrote:
> >> ----- Original Message -----
> >>> From: "David Parker"<dparker@...>
> >>> To: pacemaker@...
> >>> Sent: Wednesday, August 22, 2012 2:49:32 PM
> >>> Subject: [Pacemaker] Issues with HA cluster for mysqld
> >>>
> >>> Hello,
> >>>
> >>> I'm trying to set up a 2-node, active-passive HA cluster for
> >>> MySQL
> >>> using
> >>> heartbeat and Pacemaker.  The operating system is Debian Linux
> >>> 6.0.5
> >>> 64-bit, and I am using the heartbeat packages installed via
> >>> apt-get.
> >>> The servers involved are the SQL nodes of a running MySQL
> >>> cluster, so
> >>> the only service I need HA for is the MySQL daemon (mysqld).
> >>>
> >>> What I would like to do is have a single virtual IP address which
(Continue reading)

David Parker | 23 Aug 2012 22:47
Favicon

Re: Issues with HA cluster for mysqld


On 08/23/2012 04:19 PM, Jake Smith wrote:
>> Okay, I think I've almost got this.  I updated my Pacemaker config
>> and
>> made a few changes.  I put the MysqlIP and mysqld primitives into a
>> resource group called "mysqld-resources", ordered them such that
>> mysqld
>> will always wait for MysqlIP to be ready first, and added constraints
>> to
>> make ha1 the preferred host for the mysqld-resources group and ha2
>> the
>> failover host.  I also created STONITH devices for both ha1 and ha2,
>> and
>> added constraints to fix the STONIOTH location issues.  My new
>> constraints section looks like this:
>>
>> <constraints>
>> <rsc_location id="loc-1" rsc="stonith-ha1" node="ha2"
>> score="INFINITY"/>
>> <rsc_location id="loc-2" rsc="stonith-ha2" node="ha1"
>> score="INFINITY"/>
> Don't need the 2 above as long as you have the 2 negative locations below for stonith locations.  I prefer the
negative below because if you ever expanded to greater than 2 nodes the stonith for any node could run on any
node but itself.

Good call.  I'll take those out of the config.

>> <rsc_location id="loc-3" rsc="stonith-ha1" node="ha1"
>> score="-INFINITY"/>
>> <rsc_location id="loc-4" rsc="stonith-ha2" node="ha2"
(Continue reading)

Jake Smith | 23 Aug 2012 23:26
Favicon

Re: Issues with HA cluster for mysqld


----- Original Message -----
> From: "David Parker" <dparker@...>
> To: pacemaker@...
> Sent: Thursday, August 23, 2012 4:47:11 PM
> Subject: Re: [Pacemaker] Issues with HA cluster for mysqld
> 
> 
> On 08/23/2012 04:19 PM, Jake Smith wrote:
> >> Okay, I think I've almost got this.  I updated my Pacemaker config
> >> and
> >> made a few changes.  I put the MysqlIP and mysqld primitives into
> >> a
> >> resource group called "mysqld-resources", ordered them such that
> >> mysqld
> >> will always wait for MysqlIP to be ready first, and added
> >> constraints
> >> to
> >> make ha1 the preferred host for the mysqld-resources group and ha2
> >> the
> >> failover host.  I also created STONITH devices for both ha1 and
> >> ha2,
> >> and
> >> added constraints to fix the STONIOTH location issues.  My new
> >> constraints section looks like this:
> >>
> >> <constraints>
> >> <rsc_location id="loc-1" rsc="stonith-ha1" node="ha2"
> >> score="INFINITY"/>
> >> <rsc_location id="loc-2" rsc="stonith-ha2" node="ha1"
(Continue reading)

David Parker | 27 Aug 2012 19:56
Favicon

Re: Issues with HA cluster for mysqld


On 08/23/2012 05:26 PM, Jake Smith wrote:
> ----- Original Message -----
>> From: "David Parker"<dparker@...>
>> To: pacemaker@...
>> Sent: Thursday, August 23, 2012 4:47:11 PM
>> Subject: Re: [Pacemaker] Issues with HA cluster for mysqld
>>
>>
>> On 08/23/2012 04:19 PM, Jake Smith wrote:
>>>> Okay, I think I've almost got this.  I updated my Pacemaker config
>>>> and
>>>> made a few changes.  I put the MysqlIP and mysqld primitives into
>>>> a
>>>> resource group called "mysqld-resources", ordered them such that
>>>> mysqld
>>>> will always wait for MysqlIP to be ready first, and added
>>>> constraints
>>>> to
>>>> make ha1 the preferred host for the mysqld-resources group and ha2
>>>> the
>>>> failover host.  I also created STONITH devices for both ha1 and
>>>> ha2,
>>>> and
>>>> added constraints to fix the STONIOTH location issues.  My new
>>>> constraints section looks like this:
>>>>
>>>> <constraints>
>>>> <rsc_location id="loc-1" rsc="stonith-ha1" node="ha2"
>>>> score="INFINITY"/>
(Continue reading)

Dejan Muhamedagic | 24 Aug 2012 09:17

Re: Issues with HA cluster for mysqld

Hi,

On Thu, Aug 23, 2012 at 04:47:11PM -0400, David Parker wrote:
> 
> On 08/23/2012 04:19 PM, Jake Smith wrote:
> >>Okay, I think I've almost got this.  I updated my Pacemaker config
> >>and
> >>made a few changes.  I put the MysqlIP and mysqld primitives into a
> >>resource group called "mysqld-resources", ordered them such that
> >>mysqld
> >>will always wait for MysqlIP to be ready first, and added constraints
> >>to
> >>make ha1 the preferred host for the mysqld-resources group and ha2
> >>the
> >>failover host.  I also created STONITH devices for both ha1 and ha2,
> >>and
> >>added constraints to fix the STONIOTH location issues.  My new
> >>constraints section looks like this:
> >>
> >><constraints>
> >><rsc_location id="loc-1" rsc="stonith-ha1" node="ha2"
> >>score="INFINITY"/>
> >><rsc_location id="loc-2" rsc="stonith-ha2" node="ha1"
> >>score="INFINITY"/>
> >Don't need the 2 above as long as you have the 2 negative locations below for stonith locations.  I prefer
the negative below because if you ever expanded to greater than 2 nodes the stonith for any node could run on
any node but itself.
> 
> Good call.  I'll take those out of the config.
> 
(Continue reading)


Gmane