Re: [ClusterLabs] mail server (postfix)

2016-06-06 Thread Dimitri Maziuk
On 06/06/2016 03:04 AM, Vladislav Bogdanov wrote:

...
> 5) promote service on nodeB - replace config and internally reload/restart
> 6) start VIP on nodeB
> 
> 1-2 and 5-6 pairs may need to be reversed if you bind service to a
> specific VIP (instead of listening on INADDR_ANY).

Yeah, that could work... but if my way works I won't have to write my
own RA -- or at least not for postfix. ;)

Thanks,
-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] mail server (postfix)

2016-06-06 Thread Vladislav Bogdanov

05.06.2016 22:22, Dimitri Maziuk wrote:

On 06/04/2016 01:02 PM, Vladislav Bogdanov wrote:


I'd modify RA to support master/slave concept.


I'm assuming you use a shared mail store on your imapd cluster? I want


No, I use cyrus internal replication.


to host the storage on the same cluster with mail daemons. I want to a)
stop accepting mail, b) fail-over drbd maildirs, then c) restart postfix
in send-only "slave" configuration. On the other node I could simply
restart the "master" postfix after b), but on the node going passive the
b) has to be between a) and c).


Do you have reasons for b) to be strictly between a) and c) ?

I'd propose something as the following:
0a) service is a master on one node (nodeA) - it listens on socket and 
stores mail to DRBD-backd maildirs.

0b) service is a slave on second node (nodeB) - send-only config
1) stop VIP on nodeA
2) demote service on nodeA (replace config and restart/reload it 
internally in the RA) - that would combine your a) and c)

3) demote DRBD on nodeA (first part of your b) )
4) promote DRBD on nodeB (second part of b) )
5) promote service on nodeB - replace config and internally reload/restart
6) start VIP on nodeB

1-2 and 5-6 pairs may need to be reversed if you bind service to a 
specific VIP (instead of listening on INADDR_ANY).


For 2 and 5 to work correctly you need to colocate service in *master* 
role with DRBD in *master* role. That way "slave" service instance does 
not require DRBD at all.


Hope this helps,
Vladislav


___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] mail server (postfix)

2016-06-05 Thread Dimitri Maziuk
On 06/04/2016 01:02 PM, Vladislav Bogdanov wrote:

> I'd modify RA to support master/slave concept.

I'm assuming you use a shared mail store on your imapd cluster? I want
to host the storage on the same cluster with mail daemons. I want to a)
stop accepting mail, b) fail-over drbd maildirs, then c) restart postfix
in send-only "slave" configuration. On the other node I could simply
restart the "master" postfix after b), but on the node going passive the
b) has to be between a) and c).

Thx,
-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] mail server (postfix)

2016-06-04 Thread Vladislav Bogdanov
3 .6.2016 г. 20:33:01 GMT+03:00, Dimitri Maziuk  wrote

Sorry for top-post.

I'd modify RA to support master/slave concept. I use the same approach to 
manage cyrus-imapd replicas, passing them different pre-installed config files, 
depending on operation, start, promote, or demote.

Best,
Vladislav

>Hi all,
>
>quick question: is anyone running an MTA on an active-passive cluster?
>Specifically, I need to do a stop - wait for drbd fs to move over -
>update symlinks - then start again -- on both nodes. So that on the
>active node the MTA runs with "mail gateway" postfix config in
>/drbd/etc/postfix and on the passive: with "send-only" config in
>/etc/postfix.
>
>Off the top of my head it looks like defining two postfix resources
>that
>both start/stop the same postfix only at different times/on different
>nodes should do the trick. Any gotchas I'm not seeing? Better ways to
>accomplish it?
>
>(I know running an MTA that way is not the Approved Way(tm), I have my
>reasons for wanting to it like this.)
>
>TIA



___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] mail server (postfix)

2016-06-04 Thread Digimer
On 04/06/16 01:27 PM, Dmitri Maziuk wrote:
> On 2016-06-04 01:10, Digimer wrote:
> 
>> We're running postfix/dovecot/postgres for our mail on an HA cluster,
>> but we put it all in a set of VMs and made the VMs HA on DRBD.
> 
> Hmm. I deliver to ~/Maildir and /home is NFS-mounted all over the place,
> so my primary goal is HA NFS server. I'd hesitate to add a VM layer
> there. NFS-mounted /home on the mail gateway is what I have now and that
> works fine... having that in HA setup is more or less icing on the cake.
> 
> Thanks,
> Dimitri

Avoiding complexity is a very valid goal in HA, so I won't fault your
logic at all.

-- 
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without
access to education?

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] mail server (postfix)

2016-06-04 Thread Dmitri Maziuk

On 2016-06-04 01:10, Digimer wrote:


We're running postfix/dovecot/postgres for our mail on an HA cluster,
but we put it all in a set of VMs and made the VMs HA on DRBD.


Hmm. I deliver to ~/Maildir and /home is NFS-mounted all over the place, 
so my primary goal is HA NFS server. I'd hesitate to add a VM layer 
there. NFS-mounted /home on the mail gateway is what I have now and that 
works fine... having that in HA setup is more or less icing on the cake.


Thanks,
Dimitri


___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] mail server (postfix)

2016-06-04 Thread Digimer
On 03/06/16 01:33 PM, Dimitri Maziuk wrote:
> Hi all,
> 
> quick question: is anyone running an MTA on an active-passive cluster?
> Specifically, I need to do a stop - wait for drbd fs to move over -
> update symlinks - then start again -- on both nodes. So that on the
> active node the MTA runs with "mail gateway" postfix config in
> /drbd/etc/postfix and on the passive: with "send-only" config in
> /etc/postfix.
> 
> Off the top of my head it looks like defining two postfix resources that
> both start/stop the same postfix only at different times/on different
> nodes should do the trick. Any gotchas I'm not seeing? Better ways to
> accomplish it?
> 
> (I know running an MTA that way is not the Approved Way(tm), I have my
> reasons for wanting to it like this.)
> 
> TIA

We're running postfix/dovecot/postgres for our mail on an HA cluster,
but we put it all in a set of VMs and made the VMs HA on DRBD. We go
this route because one setup can be adapted to just about any
application. This also allows migrations without interruptions.

Didn't answer you question, but maybe an alternate approach to consider.

-- 
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without
access to education?

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


[ClusterLabs] mail server (postfix)

2016-06-03 Thread Dimitri Maziuk
Hi all,

quick question: is anyone running an MTA on an active-passive cluster?
Specifically, I need to do a stop - wait for drbd fs to move over -
update symlinks - then start again -- on both nodes. So that on the
active node the MTA runs with "mail gateway" postfix config in
/drbd/etc/postfix and on the passive: with "send-only" config in
/etc/postfix.

Off the top of my head it looks like defining two postfix resources that
both start/stop the same postfix only at different times/on different
nodes should do the trick. Any gotchas I'm not seeing? Better ways to
accomplish it?

(I know running an MTA that way is not the Approved Way(tm), I have my
reasons for wanting to it like this.)

TIA
-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org