Hi Jeroen, On Fri, Aug 19, 2011 at 04:07:04PM +0200, jer...@intuxicated.org wrote: > > On Wed, 3 Aug 2011 15:34:37 +0200, Dejan Muhamedagic <de...@suse.de> wrote: > > Hi Jeroen, > > > > On Fri, Jul 22, 2011 at 10:51:56AM +0200, jer...@intuxicated.org wrote: > >> > >> On Fri, 15 Apr 2011 14:45:59 +0200, "Raoul Bhatia [IPAX]" > >> <r.bha...@ipax.at> > >> wrote: > >> > On 04/15/2011 01:19 PM, Andrew Beekhof wrote: > >> >> On Fri, Apr 15, 2011 at 12:53 PM, Raoul Bhatia [IPAX] > >> >> <r.bha...@ipax.at> > >> >> wrote: > >> >>> On 04/15/2011 11:10 AM, jer...@intuxicated.org wrote: > >> >>>> > >> >>>> Yes, it does the same thing but contains some additional features, > >> like > >> >>>> logging into a mailbox. > >> >>> > >> >>> first of all, i do not know how the others think about a ocf ra > >> >>> implemented in c. i'll suggest waiting for comments from dejan or > >> >>> fghass. > >> >> > >> >> the ipv6addr agent was written in C too > >> >> the OCF standard does not dictate the language to be used - its > really > >> >> a matter of whether C is the best tool for this job > >> > > >> > thank you andrew! > >> > > >> > jeroen, can you please create a github fork off > >> > https://github.com/ClusterLabs/ (it's really easy!) > >> > > >> > and add your resource agent in the same fashion as IPv6addr.c [1] ? > >> > > >> > thanks, > >> > raoul > >> > > >> > [1] > >> > > >> > https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/IPv6addr.c > >> > >> Hi, > >> > >> I finally found some time to get the code on GitHub. > >> > >> https://github.com/perrit/dovecot-ocf-resource-agent > >> > >> As you can see it's kind of hard to merge the code in the same way as > >> IPv6addr.c as it currently spans multiple files. Would you like me to > >> just > >> put it in a directory? Maybe it's a good idea to split the dovecot part > >> and > >> the mailbox login part, so that there's a mailbox login resource agent > >> becomes more like the ping resource agent? > > > > I really hate to say it, since you obviously invested quite a > > bit of time to put together this agent, but C is arguably not > > the best suited programming language for resource agents. I > > guess that's why all init scripts are, well, shell scripts. And > > all but one of our OCF resource agents. The code is around > > 4kloc, which is as big as some of our subsystems. That's a lot > > of code to read and maintain. > > > > Was there a good reason to choose C for the implementation? > > > > Cheers, > > > > Dejan > > > > Hi Dejan, > > Sorry for the late reply. > > Well I the wanted to automatically decide which interfaces should be > monitored (POP3/IMAP). I had a lot of trouble parsing with sh/bash, so I > decided this would easier to do in C.
You should've asked on the ML, perhaps somebody would have an idea. > Most of the code is needed to imitate > the ocf bash functions in C, if those functions could be provided in a > library (which others could also benefit from of course), the resource > agent itself can be much, much smaller. OK, but that's not obvious. All code is in a single directory. > Maybe the the POP3/IMAP login part can be split from the dovecot specific > part, and provide a seperate resource agent, much like the ping resource > agent. So that other POP3/IMAP servers like courier or perdition for > example can also be monitored. The resource agent for the dovecot service > itself can then simply be written in sh/bash. > > If I ever want to write a new resource agent, is there a list of basic > requirements somewhere to get the resource agent included? There is a OCF RA implementation guide, written by Florian Haas. Thanks, Dejan > Regards, > Jeroen > > >> Regards, > >> Jeroen > >> _______________________________________________________ > >> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org > >> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > >> Home Page: http://linux-ha.org/ > > _______________________________________________________ > > Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org > > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > > Home Page: http://linux-ha.org/ > _______________________________________________________ > Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > Home Page: http://linux-ha.org/ _______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/