Re: Failover-HA-Setup

2007-01-21 Thread Doug Barton
Ulrich Spoerlein wrote:

> Only two options remain: modify existing mysql-server script (bad idea,
> will be overwritten on update) or go through a proxy script which
> "transforms" start|stop -> onestart|onestop
> 
> You could also alter the environment of heartbeat (it's really just a
> bunch of poorly written shell scripts) and set mysql_enable=YES there,
> but that'd be just as fragile as rewriting the existing mysql-server
> script.

Yeah, I thin we're definitely in territory that is not covered by the
boot scripts as written here.

This thread has got me thinking though, how useful would something
like 'foo_enable=conditional' be? What I'm thinking is that you could
define a script in foo_condition that rc.d would run. We could either
do a straight yes/no, where if the script exits successfully (exit
code 0) then we run the service, and if it fails (non-zero exit code)
we don't. OR, we could have the script return the argument we want to
feed that service's startup script.

I think that may have some utility here, what do y'all think?


Doug

-- 

This .signature sanitized for your protection
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-19 Thread Ulrich Spoerlein
Richard wrote:
> > There is no need to make any changes to the script. Put whatever other
> >  options you want for mysql in rc.conf, and set the _enable variable
> > to no. Then you can run /usr/local/etc/rc.d/mysql-server onestart and
> > it will start normally just one time.
> 
> Yes, and mysql will be started at bootup time on both nodes, wouldn't
> it? So one node would fail miserably since the lack of mounted
> diskspace...

No, he wrote to set mysql_enable=NO, ie, the usual startup procedure
will NOT start it.

This doesn't work with heartbeat, however. heartbeat always calls the
resource scripts with either 'start' or 'stop', you can't make it pass
'onestart'.

Only two options remain: modify existing mysql-server script (bad idea,
will be overwritten on update) or go through a proxy script which
"transforms" start|stop -> onestart|onestop

You could also alter the environment of heartbeat (it's really just a
bunch of poorly written shell scripts) and set mysql_enable=YES there,
but that'd be just as fragile as rewriting the existing mysql-server
script.

> But the "nostart"-solution sounds like working...

Till you update the port and forget about your local modification ...

Ulrich Spoerlein
-- 
A: Yes.
>Q: Are you sure?
> >A: Because it reverses the logical flow of conversation.
> >>Q: Why is top posting frowned upon?
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-18 Thread Ivan Voras
Richard wrote:

> If the variable mysql_enable is set in '/etc/rc.conf', mysql is started
> on both nodes at startup, it it is not there (and the passive node won't
> work due to the lack of mounted diskspace), heartbeat call
> '/usr/local/etc/rc.d/mysql-server start' and nothing happens. 

rc.conf is "sourced" by rc.subr. In other words, it's a shell script.
You can thus set it up so it sets some variables when called from
heartbeat and others when called by boot. For example, you can set an
environment variable by heartbeat (or by a script that heartbeat
calls...) and judge from that.

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-18 Thread Richard
On Wed, 2007-01-17 at 10:20 -0800, Doug Barton wrote:
> Bill Milford wrote:
> 
> > You can modify the keyword section of the
> > /usr/local/etc/rc.d/mysql-server(.sh) and add "nostart"  This 
> > allows you to start it manually with
> > /usr/local/etc/rc.d/mysql-server start, but it will not start at
> > boot time as rcorder skips files with the nostart keyword.  The
> > startup variable can then be in /etc/rc.conf
> 
> There is no need to make any changes to the script. Put whatever other
>  options you want for mysql in rc.conf, and set the _enable variable
> to no. Then you can run /usr/local/etc/rc.d/mysql-server onestart and
> it will start normally just one time.

Yes, and mysql will be started at bootup time on both nodes, wouldn't
it? So one node would fail miserably since the lack of mounted
diskspace...

But the "nostart"-solution sounds like working...


RIchard

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-18 Thread Richard
On Wed, 2007-01-17 at 19:48 +0100, Ivan Voras wrote:
> Richard wrote:
> 
> > Am Mittwoch, den 17.01.2007, 16:08 +0200 schrieb Nikos Vassiliadis:
> 
> >> I remember that heartbeat can call any script you it tell to.
> >> So, you have to let heartbeat start MySQL. rc will just start
> >> heartbeat.
> > Yes, you are right, and exactly that was my problem. It didn't start.
> 
> Hmm, do you have more information - in which way did it fail? rc.d
> scripts (including those for mysql) bring in variables via rc.subr:
> 
> 
> #
> # Add the following line to /etc/rc.conf to enable mysql:
> # mysql_enable (bool):  Set to "NO" by default.
>
> Are you saying this part has failed, or that you don't have the proper
> variables in /etc/rc.conf?

If the variable mysql_enable is set in '/etc/rc.conf', mysql is started
on both nodes at startup, it it is not there (and the passive node won't
work due to the lack of mounted diskspace), heartbeat call
'/usr/local/etc/rc.d/mysql-server start' and nothing happens. I got
around this problem by writing my own startup-scripts not using those
Variables. I thought that there might be a much nicer solution, but a
failover configuration working with FreeBSD seems not to be that
widespread as it is under Linux. (Yes, there are many
firewall-implementations using carp, but would that work for services
like mysql or samba too?)


Richard

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread James Long
> Date: Wed, 17 Jan 2007 13:47:37 +0100
> From: Richard <[EMAIL PROTECTED]>
> Subject: Failover-HA-Setup
> To: freebsd-stable@freebsd.org
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain
> 
> Hi there!
> 
> I am looking for a solution for a small problem regarding a high
> availability setup.
> I am running heartbeat on a STABLE-system, the failover works fine for
> IP-adresses and I am able to see that a
> '/usr/local/etc/rc.d/mysql-server start' statement is issued. BUT since
> the variables for mysql are not set in rc.conf (Otherwise it would be
> started at startup), it isn't starting at all.
> 
> So my question: How to set those rc.conf-variables in order to start
> services in such an setup? Or is there a better solution?
> 
> 
> cu!
> 
> Richard

export mysql_enable="YES" && /usr/local/etc/rc.d/mysql-server start
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Tom Samplonius

- Mark Saad <[EMAIL PROTECTED]> wrote:
> Ivan Voras wrote:
> > Dmitriy Kirhlarov wrote:
> >> On Wed, Jan 17, 2007 at 03:20:32PM +0100, Richard Verwayen wrote:
> >>
> >>> Oh, should I have mentioned that it is a shared SCSI-Storage in
> between?
> >> You can use gmirror(8) with ggated(8).
> > 
> > I think his problem is that you can't have two machines RW mounting
> the
> > same device (doesn't matter if it's FC, ggate or other...). So when
> one
> > machine fails, the other must mount the file system and THEN start
> > daemons...
> > 
> > 
> > 
> This is kind of a side topic but does anyone know of a on disk
> clustered 
> file system for FreeBSD; like OCFS2 or GFS . Both which would allow
> you 
> to have more then one box attached read / write to the same scsi or fc
> 
> storage array ?

  I don't believe there are any.

  Additionally, I don't believe any of the clustered file systems would be 
usable for a database backend.  Because the application does not know that 
another instance is also updating, so you would have to start only one instance 
at a time.  So the locking overhead of a clustered filesystem isn't worth it 
for databases.

> -- 
> Mark Saad
> [EMAIL PROTECTED]

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Mark Saad

Ivan Voras wrote:

Dmitriy Kirhlarov wrote:

On Wed, Jan 17, 2007 at 03:20:32PM +0100, Richard Verwayen wrote:


Oh, should I have mentioned that it is a shared SCSI-Storage in between?

You can use gmirror(8) with ggated(8).


I think his problem is that you can't have two machines RW mounting the
same device (doesn't matter if it's FC, ggate or other...). So when one
machine fails, the other must mount the file system and THEN start
daemons...



This is kind of a side topic but does anyone know of a on disk clustered 
file system for FreeBSD; like OCFS2 or GFS . Both which would allow you 
to have more then one box attached read / write to the same scsi or fc 
storage array ?




--
Mark Saad
[EMAIL PROTECTED]
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Failover-HA-Setup

2007-01-17 Thread Ivan Voras
Richard wrote:

> Am Mittwoch, den 17.01.2007, 16:08 +0200 schrieb Nikos Vassiliadis:

>> I remember that heartbeat can call any script you it tell to.
>> So, you have to let heartbeat start MySQL. rc will just start
>> heartbeat.
> Yes, you are right, and exactly that was my problem. It didn't start.

Hmm, do you have more information - in which way did it fail? rc.d
scripts (including those for mysql) bring in variables via rc.subr:


#
# Add the following line to /etc/rc.conf to enable mysql:
# mysql_enable (bool):  Set to "NO" by default.
#   Set it to "YES" to enable MySQL.
# mysql_limits (bool):  Set to "NO" by default.
#   Set it to yes to run `limits -e -U mysql`
#   just before mysql starts.
# mysql_dbdir (str):Default to "/var/db/mysql"
#   Base database directory.
# mysql_args (str): Custom additional arguments to be passed
#   to mysqld_safe (default empty).
#

. /etc/rc.subr

name="mysql"
rcvar=`set_rcvar`

load_rc_config $name

: ${mysql_enable="NO"}
: ${mysql_limits="NO"}
: ${mysql_dbdir="/var/db/mysql"}
: ${mysql_args=""}


Are you saying this part has failed, or that you don't have the proper
variables in /etc/rc.conf?



signature.asc
Description: OpenPGP digital signature


Re: Failover-HA-Setup

2007-01-17 Thread Ivan Voras
Dmitriy Kirhlarov wrote:
> On Wed, Jan 17, 2007 at 03:20:32PM +0100, Richard Verwayen wrote:
> 
>> Oh, should I have mentioned that it is a shared SCSI-Storage in between?
> 
> You can use gmirror(8) with ggated(8).

I think his problem is that you can't have two machines RW mounting the
same device (doesn't matter if it's FC, ggate or other...). So when one
machine fails, the other must mount the file system and THEN start
daemons...





signature.asc
Description: OpenPGP digital signature


Re: Failover-HA-Setup

2007-01-17 Thread Doug Barton
Bill Milford wrote:

> You can modify the keyword section of the
> /usr/local/etc/rc.d/mysql-server(.sh) and add "nostart"  This 
> allows you to start it manually with
> /usr/local/etc/rc.d/mysql-server start, but it will not start at
> boot time as rcorder skips files with the nostart keyword.  The
> startup variable can then be in /etc/rc.conf

There is no need to make any changes to the script. Put whatever other
 options you want for mysql in rc.conf, and set the _enable variable
to no. Then you can run /usr/local/etc/rc.d/mysql-server onestart and
it will start normally just one time.

Doug

-- 

This .signature sanitized for your protection
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Doug Barton
Please don't post replies to messages on the freebsd lists above the
message. While that's common in other circles (especially the business
world) it's not how we do things here.

Rauf Kuliyev wrote:
> Try '/usr/local/etc/rc.d/mysql-server forcestart'

If your intention is to start a service normally even though its
corresponding _enable option is not set in /etc/rc.conf[.local], then
you're better off using the 'onestart' option instead of 'forcestart'.

hth,

Doug

-- 

This .signature sanitized for your protection
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Failover-HA-Setup

2007-01-17 Thread Bill Milford
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Richard
> Sent: Wednesday, January 17, 2007 8:37 AM
> To: freebsd-stable@freebsd.org
> Subject: Re: Failover-HA-Setup
> 
> Am Mittwoch, den 17.01.2007, 17:25 +0300 schrieb Dmitriy Kirhlarov:
> > Hi!
> >
> > On Wed, Jan 17, 2007 at 01:47:37PM +0100, Richard wrote:
> >
> > > I am running heartbeat on a STABLE-system, the failover works fine for
> > > IP-adresses and I am able to see that a
> >
> > Why you ignore carp(4) and ports/net/ifstated?
> I asked for a better solution in my OP...
> But since I am familiar with heartbeat on Linux, I thought I could give
> it a try...
> 
> >
> > > '/usr/local/etc/rc.d/mysql-server start' statement is issued. BUT since
> > > the variables for mysql are not set in rc.conf (Otherwise it would be
> > > started at startup), it isn't starting at all.
> >
> > You can use in /etc/rc.conf:
> >
> > [ -r /usr/local/etc/rc.mysql.conf ] && . /usr/local/etc/rc.mysql.conf
> >
> > and using this include for manipulate with mysql start variables.
> >
> > Your shared IP address moving with script, I think. This script can
> > modify /usr/local/etc/rc.mysql.conf also.
> At the moment, I am just using heartbeat which is capable of moving IPs
> and Services from one Node to the other.
> 
> 
> Thx!
> 
> Richard
> 
> ___

You can modify the keyword section of the /usr/local/etc/rc.d/mysql-server(.sh) 
and add "nostart"  This
allows you to start it manually with /usr/local/etc/rc.d/mysql-server start, 
but it will not start at boot
time as rcorder skips files with the nostart keyword.  The startup variable can 
then be in /etc/rc.conf

Bill

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Dmitriy Kirhlarov
On Wed, Jan 17, 2007 at 03:20:32PM +0100, Richard Verwayen wrote:

> Oh, should I have mentioned that it is a shared SCSI-Storage in between?

You can use gmirror(8) with ggated(8).

By.
Dmitriy
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Richard
Hi Nikos!

Am Mittwoch, den 17.01.2007, 16:08 +0200 schrieb Nikos Vassiliadis:
> > I am running heartbeat on a STABLE-system, the failover works fine for
> > IP-adresses and I am able to see that a
> > '/usr/local/etc/rc.d/mysql-server start' statement is issued. BUT since
> > the variables for mysql are not set in rc.conf (Otherwise it would be
> > started at startup), it isn't starting at all.
> > 
> > So my question: How to set those rc.conf-variables in order to start
> > services in such an setup? Or is there a better solution?
> 
> Which service is highly available in this setup? MySQL?
> How do you sync the data? ggate?
I am using a "shared" SCSI-Storage inbetween these servers. The acive
node mounts a Volume and the service is started. (Yes, I know, it isn't
really HA since there is still a SPOF)

> 
> I remember that heartbeat can call any script you it tell to.
> So, you have to let heartbeat start MySQL. rc will just start
> heartbeat.
Yes, you are right, and exactly that was my problem. It didn't start.

I worked around it by copying the startup-scripts
from /usr/local/etc/rc.d to /usr/local/etc/ha.d/resource.d/ and removed
the critical test which ask for the variables set in rc.conf.

Thanks for all your help!

Richard

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Eugene Grosbein
On Wed, Jan 17, 2007 at 03:10:29PM +0100, Richard wrote:

> > Try '/usr/local/etc/rc.d/mysql-server forcestart'

> Hm, that's only a temporary solution.
> 
> As a background:
> 
> Heartbeat monitors the HA nodes via a UDP ping (or other method) and if
> one of the nodes goes down, it takes over a clustered IP and then starts
> services by issuing the corresponding scripts in [/usr/local|]/etc/rc.d
> with the argument start...
> 
> So your solution will not really work

Just put another script into /usr/local/etc/rc.d that would
run /usr/local/etc/rc.d/mysql-server forcestart
if and only if a flag is present in your system.
Create the flag when system boots and before /usr/local/etc/rc.d/mysql-server
starts with rcorder. Remove the flag just after 
/usr/local/etc/rc.d/mysql-server has finished.

You can user crons '@reboot' feature to create a flag
and one more rc.d script that runs after mysql-server and removes flag.

Eugene Grosbein
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Richard
Am Mittwoch, den 17.01.2007, 17:25 +0300 schrieb Dmitriy Kirhlarov:
> Hi!
> 
> On Wed, Jan 17, 2007 at 01:47:37PM +0100, Richard wrote:
> 
> > I am running heartbeat on a STABLE-system, the failover works fine for
> > IP-adresses and I am able to see that a
> 
> Why you ignore carp(4) and ports/net/ifstated?
I asked for a better solution in my OP... 
But since I am familiar with heartbeat on Linux, I thought I could give
it a try...

> 
> > '/usr/local/etc/rc.d/mysql-server start' statement is issued. BUT since
> > the variables for mysql are not set in rc.conf (Otherwise it would be
> > started at startup), it isn't starting at all.
> 
> You can use in /etc/rc.conf:
> 
> [ -r /usr/local/etc/rc.mysql.conf ] && . /usr/local/etc/rc.mysql.conf
> 
> and using this include for manipulate with mysql start variables.
> 
> Your shared IP address moving with script, I think. This script can
> modify /usr/local/etc/rc.mysql.conf also.
At the moment, I am just using heartbeat which is capable of moving IPs
and Services from one Node to the other.


Thx!

Richard

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Nikos Vassiliadis
On Wednesday 17 January 2007 14:47, Richard wrote:
> Hi there!
> 
> I am looking for a solution for a small problem regarding a high
> availability setup.
> I am running heartbeat on a STABLE-system, the failover works fine for
> IP-adresses and I am able to see that a
> '/usr/local/etc/rc.d/mysql-server start' statement is issued. BUT since
> the variables for mysql are not set in rc.conf (Otherwise it would be
> started at startup), it isn't starting at all.
> 
> So my question: How to set those rc.conf-variables in order to start
> services in such an setup? Or is there a better solution?

Which service is highly available in this setup? MySQL?
How do you sync the data? ggate?

I remember that heartbeat can call any script you it tell to.
So, you have to let heartbeat start MySQL. rc will just start
heartbeat.

Nikos
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Dominic Marks
On Wed, 17 Jan 2007 15:20:32 +0100
Richard Verwayen <[EMAIL PROTECTED]> wrote:

> Am Mittwoch, den 17.01.2007, 14:04 + schrieb Dominic Marks:
> > On Wed, 17 Jan 2007 14:47:43 +0100
> > Richard <[EMAIL PROTECTED]> wrote:
> > 
> > > Am Mittwoch, den 17.01.2007, 13:16 + schrieb Dominic Marks:
> > > > setup.
> > > > > I am running heartbeat on a STABLE-system, the failover works fine for
> > > > > IP-adresses and I am able to see that a
> > > > > '/usr/local/etc/rc.d/mysql-server start' statement is issued. BUT 
> > > > > since
> > > > > the variables for mysql are not set in rc.conf (Otherwise it would be
> > > > > started at startup), it isn't starting at all.
> > > > Why have the backup MySQL server stopped at all?
> > > I am limited to an active/passive-Setup due to some Decisions in our
> > > company
> > 
> > But if the IP address is not assigned to the backup system it
> > won't be active. I suppose it depends on your policy, whatever
> > that may be.
> Oh, should I have mentioned that it is a shared SCSI-Storage in between?

Probably :-)
 
> Richard

Dom
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Richard Verwayen
Am Mittwoch, den 17.01.2007, 14:04 + schrieb Dominic Marks:
> On Wed, 17 Jan 2007 14:47:43 +0100
> Richard <[EMAIL PROTECTED]> wrote:
> 
> > Am Mittwoch, den 17.01.2007, 13:16 + schrieb Dominic Marks:
> > > setup.
> > > > I am running heartbeat on a STABLE-system, the failover works fine for
> > > > IP-adresses and I am able to see that a
> > > > '/usr/local/etc/rc.d/mysql-server start' statement is issued. BUT since
> > > > the variables for mysql are not set in rc.conf (Otherwise it would be
> > > > started at startup), it isn't starting at all.
> > > Why have the backup MySQL server stopped at all?
> > I am limited to an active/passive-Setup due to some Decisions in our
> > company
> 
> But if the IP address is not assigned to the backup system it
> won't be active. I suppose it depends on your policy, whatever
> that may be.
Oh, should I have mentioned that it is a shared SCSI-Storage in between?


Richard

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Dmitriy Kirhlarov
Hi!

On Wed, Jan 17, 2007 at 01:47:37PM +0100, Richard wrote:

> I am running heartbeat on a STABLE-system, the failover works fine for
> IP-adresses and I am able to see that a

Why you ignore carp(4) and ports/net/ifstated?

> '/usr/local/etc/rc.d/mysql-server start' statement is issued. BUT since
> the variables for mysql are not set in rc.conf (Otherwise it would be
> started at startup), it isn't starting at all.

You can use in /etc/rc.conf:

[ -r /usr/local/etc/rc.mysql.conf ] && . /usr/local/etc/rc.mysql.conf

and using this include for manipulate with mysql start variables.

Your shared IP address moving with script, I think. This script can
modify /usr/local/etc/rc.mysql.conf also.

WBR.
Dmitriy
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Rauf Kuliyev

Try '/usr/local/etc/rc.d/mysql-server forcestart'

On 1/17/07, Richard <[EMAIL PROTECTED]> wrote:

Hi there!

I am looking for a solution for a small problem regarding a high
availability setup.
I am running heartbeat on a STABLE-system, the failover works fine for
IP-adresses and I am able to see that a
'/usr/local/etc/rc.d/mysql-server start' statement is issued. BUT since
the variables for mysql are not set in rc.conf (Otherwise it would be
started at startup), it isn't starting at all.

So my question: How to set those rc.conf-variables in order to start
services in such an setup? Or is there a better solution?


cu!

Richard

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Richard
Am Mittwoch, den 17.01.2007, 17:47 +0400 schrieb Rauf Kuliyev:
> Try '/usr/local/etc/rc.d/mysql-server forcestart'
> 
> .
> > I am running heartbeat on a STABLE-system, the failover works fine for
> > IP-adresses and I am able to see that a
> > '/usr/local/etc/rc.d/mysql-server start' statement is issued. BUT since
> > the variables for mysql are not set in rc.conf (Otherwise it would be
> > started at startup), it isn't starting at all.

Hm, that's only a temporary solution.

As a background:

Heartbeat monitors the HA nodes via a UDP ping (or other method) and if
one of the nodes goes down, it takes over a clustered IP and then starts
services by issuing the corresponding scripts in [/usr/local|]/etc/rc.d
with the argument start...

So your solution will not really work

With best regards


Richard

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Dominic Marks
On Wed, 17 Jan 2007 14:47:43 +0100
Richard <[EMAIL PROTECTED]> wrote:

> Am Mittwoch, den 17.01.2007, 13:16 + schrieb Dominic Marks:
> > setup.
> > > I am running heartbeat on a STABLE-system, the failover works fine for
> > > IP-adresses and I am able to see that a
> > > '/usr/local/etc/rc.d/mysql-server start' statement is issued. BUT since
> > > the variables for mysql are not set in rc.conf (Otherwise it would be
> > > started at startup), it isn't starting at all.
> > > 
> > > So my question: How to set those rc.conf-variables in order to start
> > > services in such an setup? Or is there a better solution?
> > 
> > Why have the backup MySQL server stopped at all?
> I am limited to an active/passive-Setup due to some Decisions in our
> company

But if the IP address is not assigned to the backup system it
won't be active. I suppose it depends on your policy, whatever
that may be.

Cheers,
Dom
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Richard
Am Mittwoch, den 17.01.2007, 13:16 + schrieb Dominic Marks:
> setup.
> > I am running heartbeat on a STABLE-system, the failover works fine for
> > IP-adresses and I am able to see that a
> > '/usr/local/etc/rc.d/mysql-server start' statement is issued. BUT since
> > the variables for mysql are not set in rc.conf (Otherwise it would be
> > started at startup), it isn't starting at all.
> > 
> > So my question: How to set those rc.conf-variables in order to start
> > services in such an setup? Or is there a better solution?
> 
> Why have the backup MySQL server stopped at all?
I am limited to an active/passive-Setup due to some Decisions in our
company

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Bill Moran
In response to Vladimir Botka <[EMAIL PROTECTED]>:
> Richard píše v st 17. 01. 2007 v 13:47 +0100:
> > Hi there!
> > 
> > I am looking for a solution for a small problem regarding a high
> > availability setup.
> > I am running heartbeat on a STABLE-system, the failover works fine for
> > IP-adresses and I am able to see that a
> > '/usr/local/etc/rc.d/mysql-server start' statement is issued. BUT since
> > the variables for mysql are not set in rc.conf (Otherwise it would be
> > started at startup), it isn't starting at all.
> > 
> > So my question: How to set those rc.conf-variables in order to start
> > services in such an setup? Or is there a better solution?
>
> Hello,
> just modify the /usr/local/etc/rc.d/mysql-server script.
> Cheers, -vlado

Then have to fsck around with diffs at every upgrade?  Not the approach I
would take.  And please don't top-post.

I don't remember the details of how heartbeat works, but you should be able
to set the required variables and export them into the environment prior
to calling the mysql-server script.  If not, just create a wrapper script
that sets the required variables then calls the rc script.

-- 
Bill Moran
Collaborative Fusion Inc.
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Vladimir Botka
Hello,
just modify the /usr/local/etc/rc.d/mysql-server script.
Cheers, -vlado

Richard píše v st 17. 01. 2007 v 13:47 +0100:
> Hi there!
> 
> I am looking for a solution for a small problem regarding a high
> availability setup.
> I am running heartbeat on a STABLE-system, the failover works fine for
> IP-adresses and I am able to see that a
> '/usr/local/etc/rc.d/mysql-server start' statement is issued. BUT since
> the variables for mysql are not set in rc.conf (Otherwise it would be
> started at startup), it isn't starting at all.
> 
> So my question: How to set those rc.conf-variables in order to start
> services in such an setup? Or is there a better solution?
> 
> 
> cu!
> 
> Richard
> 
> ___
> freebsd-stable@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Failover-HA-Setup

2007-01-17 Thread Dominic Marks
On Wed, 17 Jan 2007 13:47:37 +0100
Richard <[EMAIL PROTECTED]> wrote:

> Hi there!
> 
> I am looking for a solution for a small problem regarding a high
> availability setup.
> I am running heartbeat on a STABLE-system, the failover works fine for
> IP-adresses and I am able to see that a
> '/usr/local/etc/rc.d/mysql-server start' statement is issued. BUT since
> the variables for mysql are not set in rc.conf (Otherwise it would be
> started at startup), it isn't starting at all.
> 
> So my question: How to set those rc.conf-variables in order to start
> services in such an setup? Or is there a better solution?

Why have the backup MySQL server stopped at all?

Dom
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"