Re: Cyrus failover steps

2007-05-13 Thread Tom Samplonius

- Matthew Seaman [EMAIL PROTECTED] wrote:
 On FreeBSD, CARP would be the natural choice, seeing as it's standard
 with
 the system.  All you need is to build a kernel with 'device carp'
 added to
 the config file and to have read the carp(4) manual page.  Then just
 add
 something like:
 
   cloned_interfaces=carp0
   ifconfig_carp0=vhid 100 pass CENSORED 192.168.23.45/24
 
 to /etc/rc.conf on both machines.  Reboot, et voila: the 192.168.23.45
 IP
 will float between the two servers.

  But magical floating could be a problem for Cyrus.  Think of a case where the 
master fails, the IP floats to the replia, some mail is delivered, the master 
comes back up, and the IP moves back.  Oops... the mail delivered to the 
replica is now invisible and effectively lost.

  CARP kinda of loses for application failover, as there is no way to fire a 
script before moving the IP, and before moving the IP back.  It will probably 
grow some scriptability at some point.  But for the time being, CARP is better 
for firewalls and routers than services.  Also, there can be split brain 
issues, where both nodes think they are the master.  Or issues where a node 
will hold onto an IP even though it is actually dead.

  But HeartBeat can do this.

Tom

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Cyrus failover steps

2007-05-13 Thread Paul Dekkers
Hi,

Matthew Seaman wrote:
 On FreeBSD, CARP would be the natural choice, seeing as it's standard with
 the system.  

... CARP works nice for a floating IP-address between two servers, and
if you go that route you might want to look at ifstated (in the ports)
to control daemons based on the CARP failover...
(With heartbeat (linux-ha) you can control services as well as the
IP-addresses...)

But I'm not sure if this automatic failover is wise for use with Cyrus
replication. At least I still do my failovers manually; I still like
some more control over where my master actually is, when I recover,
verify that the last bits are properly synced (if possible run a
sync_client on the remaining logs), verify that replication was actually
working, verify that there is indeed something wrong, perhaps compare
md5s, ...
Just some checks but if a failover occurs with a slave that was
accidentally not up to speed you'll lose (the not yet synced) mail on
the previous master (if I'm not mistaken). And you can't have a sync
server and sync client at the same time and have imapd running on both
servers (then you'd only redirect your clients to the server running the
master imapd with the CARP failover)...

That said, I don't have a written 'protocol' for it yet, and I'd still
like to automate a couple of things, I was thinking of cfengine or
something like that so I can only flip a switch to change roles (and
still be carefull)... but for the application I think it's more
dangerous to rely on CARP; it might just switch addresses while the
application isn't ready for that. (We have stunnel, http proxies,
resolvers and in/outgoing MTAs, those work perfectly with CARP - even
without ifstated...)

Paul


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Cyrus failover steps

2007-05-12 Thread Matthew Seaman
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Scott M. Likens wrote:
 Hi Ilya, there are many methods for failover.
 
 One is heartbeat,
 
 According to Freshports you have a version of Heartbeat available.
 
 http://www.freshports.org/sysutils/heartbeat/
 
 it's web site is http://www.linux-ha.org
 
 Should give you some reading.
 
 Scott

On FreeBSD, CARP would be the natural choice, seeing as it's standard with
the system.  All you need is to build a kernel with 'device carp' added to
the config file and to have read the carp(4) manual page.  Then just add
something like:

  cloned_interfaces=carp0
  ifconfig_carp0=vhid 100 pass CENSORED 192.168.23.45/24

to /etc/rc.conf on both machines.  Reboot, et voila: the 192.168.23.45 IP
will float between the two servers.


 
 On Fri, 11 May 2007 13:34:20 -0400
 Ilya Vishnyakov [EMAIL PROTECTED] wrote:
 
 Hello Cyrus Gurus!
 
 I set up cyrus replication on our freeBSD 6.2 boxes. I used this
 tutorial. http://cyrusimap.web.cmu.edu/imapd/install-replication.html
 Could someone please suggest a documentation on How to failover from
 one server to another in case of emergency? I googled and googled and
 couldn't find anything. Please point me to the right direction , don't
 let me to ruin all the mailboxes. Thank you in advance.

Cheers,

Matthew

- -- 
Dr Matthew SeamanThe Bunker, Ash Radar Station
PGP: 0x60AE908C on servers   Marshborough Rd
Tel: +44 1304 814800 Sandwich
Fax: +44 1304 814899 Kent, CT13 0PL, UK
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.3 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGRaom8Mjk52CukIwRCNutAJ9wVnwlnqFrmOTYq93bJfVp7UtSOQCgh1f5
wcEiH9Z3s0m8JfhPh1yfaJs=
=UEkc
-END PGP SIGNATURE-

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Cyrus failover steps

2007-05-11 Thread Ilya Vishnyakov
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
 
Hello Cyrus Gurus!

I set up cyrus replication on our freeBSD 6.2 boxes. I used this tutorial.
http://cyrusimap.web.cmu.edu/imapd/install-replication.html
Could someone please suggest a documentation on How to failover from
one server to another in case of emergency? I googled and googled and
couldn't find anything. Please point me to the right direction , don't
let me to ruin all the mailboxes. Thank you in advance.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iD8DBQFGRKkcUZGmaUWxLn8RAm7OAKCp/YyZ86diMaYP0PtaNKejDWM8QwCeK/N4
BdQJMfZutSS37eqduzqf4MI=
=NtVI
-END PGP SIGNATURE-


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: Cyrus failover steps

2007-05-11 Thread Scott M. Likens
Hi Ilya, there are many methods for failover.

One is heartbeat,

According to Freshports you have a version of Heartbeat available.

http://www.freshports.org/sysutils/heartbeat/

it's web site is http://www.linux-ha.org

Should give you some reading.

Scott

On Fri, 11 May 2007 13:34:20 -0400
Ilya Vishnyakov [EMAIL PROTECTED] wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
  
 Hello Cyrus Gurus!
 
 I set up cyrus replication on our freeBSD 6.2 boxes. I used this
 tutorial. http://cyrusimap.web.cmu.edu/imapd/install-replication.html
 Could someone please suggest a documentation on How to failover from
 one server to another in case of emergency? I googled and googled and
 couldn't find anything. Please point me to the right direction , don't
 let me to ruin all the mailboxes. Thank you in advance.
 
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.5 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
  
 iD8DBQFGRKkcUZGmaUWxLn8RAm7OAKCp/YyZ86diMaYP0PtaNKejDWM8QwCeK/N4
 BdQJMfZutSS37eqduzqf4MI=
 =NtVI
 -END PGP SIGNATURE-
 
 
 Cyrus Home Page: http://cyrusimap.web.cmu.edu/
 Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
 List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
 
 !DSPAM:4644b4fd253086491211187!
 
 


-- 
What does one want when one is engaged in the sexual act?
That everything around you give you its utter attention
Think only of you, care only for you...
Every man wants to be a tyrant when he fornicates


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html