Hi, >>> On 7/28/2006 at 4:27 PM, in message <[EMAIL PROTECTED]>, Lars Marowsky-Bree <[EMAIL PROTECTED]> wrote: > > - Please, send the files as patches vs the Linux HA source tree; in your > case, this mean to supply a patch providing the PureFTPd.in file, > making the changes to the Makefiles to build this et cetera. Then we > can be sure we're using the same substitutions as you want us to. > > - Please, send them as attachments, not in-line. That makes it easier to > handle, and while prevent GroupWise from wrapping the lines (which it > apparently did here, too).
I have attached 2 files :-
1) pure-ftpd-config.diff - The cvs diff incorporating changes to
configure.in, Makefile.am & .cvsignore
2) The Pure-FTPd.in file which needs to be put into resources/OCF (I
tried using -N with cvs diff, but because of no write permission I
couldn't get this one into the patch.)
I compiled & installed the patched package. The installation goes fine.
Also tested the generated script in a 2 node cluster.
Have I missed out any other file which needs to be modified for this
change?
>> This is the OCF RA for Pure-FTPd.
>
> The OCF one is all what is needed, as we have a wrapper to make OCF
> scripts available as heartbeat ones too.
Ok. Is this the hto-mapfuncs script? Also, do I have to do anything for
that?
> Some comments on the script itself:
[snip]
>> HA_D=/etc/ha.d
>> . ${HA_D}/shellfuncs
>
> You shouldn't have to source shellfuncs if you're loading the OCF
> shellfuncs already.
Agreed.
>> SYSTYPE="`uname -s`"
>> case "$SYSTYPE" in
>> SunOS)
>> # `uname -r` = 5.9 -> SYSVERSION = 9
>> SYSVERSION="`uname -r | cut -d. -f 2`"
>> ;;
>> Darwin)
>> # Treat Darwin the same as the other BSD variants (matched as
>> *BSD)
>> SYSTYPE="${SYSTYPE}BSD"
>> ;;
>> *)
>> ;;
>> esac
>
> This is also dead code - nothing in your script requires the systype
to
> be known.
Removed.
[snip]
>>
>> <actions>
>> <action name="start" timeout="90" />
>> <action name="stop" timeout="100" />
>> <action name="monitor" depth="10" timeout="20s" interval="5s"
>> start-delay="1s" />
>
> Do you really want the monitor to be run every 5s by default? Of
course,
> that's your call...
No that shouldn't be necessary. I have increased it.
[snip]
>>
>> PureFTPd_status()
>> {
>> pgrep pure-ftpd >> /dev/null
>> return $?
>> }
>
> Sorry, but this is hardly a good check. There can be several
pureftpd
> instances running, can there not? This one will return success
whenever
> any single one is running.
Yes, have made appropriate changes.
>> PureFTPd_start() {
>> #
>> # make a few checks and start pure-ftpd
>> #
>> if ocf_is_root ; then : ; else
>> ocf_log err "You must be root."
>> exit $OCF_ERR_PERM
>> fi
>
> Always? I don't think this is a good check. The user could be
running
> pureftpd on a non-privileged port. (It doesn't matter, because all
RAs
> _do_ get run as root, I'm just pointing it out for completeness.)
Ok.
Thanks,
Rajat
? linux-ha/py-compile
? linux-ha/lib/plugins/quorum/twonodes.la
? linux-ha/lib/plugins/quorum/twonodes.lo
? linux-ha/lib/plugins/quorum/weight.la
? linux-ha/lib/plugins/quorum/weight.lo
? linux-ha/resources/OCF/Pure-FTPd.in
? linux-ha/resources/OCF/oracle
? linux-ha/resources/OCF/oralsnr
? linux-ha/resources/OCF/pgsql
Index: linux-ha/configure.in
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/configure.in,v
retrieving revision 1.540
diff -u -p -r1.540 configure.in
--- linux-ha/configure.in 27 Jul 2006 12:25:46 -0000 1.540
+++ linux-ha/configure.in 2 Aug 2006 04:26:54 -0000
@@ -2775,6 +2775,7 @@ resources/Makefile
\
resources/OCF/portblock \
resources/OCF/Raid1 \
resources/OCF/pgsql \
+ resources/OCF/Pure-FTPd \
resources/OCF/ServeRAID \
resources/OCF/SysInfo \
resources/OCF/VIPArip \
Index: linux-ha/resources/OCF/.cvsignore
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/OCF/.cvsignore,v
retrieving revision 1.7
diff -u -p -r1.7 .cvsignore
--- linux-ha/resources/OCF/.cvsignore 8 Jun 2006 19:16:15 -0000 1.7
+++ linux-ha/resources/OCF/.cvsignore 2 Aug 2006 04:26:55 -0000
@@ -35,3 +35,4 @@ Xen
pingd
SysInfo
VIPArip
+Pure-FTPd
Index: linux-ha/resources/OCF/Makefile.am
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/OCF/Makefile.am,v
retrieving revision 1.18
diff -u -p -r1.18 Makefile.am
--- linux-ha/resources/OCF/Makefile.am 13 Jul 2006 16:25:32 -0000 1.18
+++ linux-ha/resources/OCF/Makefile.am 2 Aug 2006 04:26:55 -0000
@@ -60,6 +60,7 @@ ocf_SCRIPTS = ClusterMon \
pingd \
portblock \
pgsql \
+ Pure-FTPd \
Raid1 \
ServeRAID \
SysInfo \
Pure-FTPd.in
Description: Binary data
_______________________________________________________ Linux-HA-Dev: [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
