[prev in list] [next in list] [prev in thread] [next in thread] 

List:       veritas-ha
Subject:    RE: [Veritas-ha] VCS Custom Agent/Application woes
From:       "Caraballo, Rafael [NCSUS non J&J]" <RCarabal () ncsus ! jnj ! com>
Date:       2003-09-10 11:25:23
[Download RAW message or body]

Check you file permissions for execute privileges.

Rafael Caraballo

-----Original Message-----
From: Keiran Sweet [mailto:KSweet@hutchison.com.au]
Sent: Tuesday, September 09, 2003 9:44 PM
To: veritas-ha@mailman.eng.auburn.edu
Subject: [Veritas-ha] VCS Custom Agent/Application woes


Hi Everyone,

I'm currently working on setting up a custom agent for an ftp daemon
running under VCS 3.5 and  have hit a snag which i am hoping some of you
guys and girls might be able to shed some light upon.

My configuration is as follows:

Sun 280R running solaris 8 + VxVM + VxFS

I am currently developing this agent on a single node VCS cluster, so i
am starting VCS with hastart -onenode

I have created a volume that  holds the binaries,configuration files
and home directories for the ftp daemon, this volume is setup to be
mounted by VCS and when the cluster starts (and the service group
starts), mounts all OK.

Output of hastatus -sum is below:

# hastatus -sum

-- SYSTEM STATE
-- System               State                Frozen

A  sdfmvol1             RUNNING              0

-- GROUP STATE
-- Group           System               Probed     AutoDisabled   
State

B  ftpdgrp         sdfmvol1             Y          N              
ONLINE



As per the Agent developers guide i have created the online, offline
and monitor entry points and they are as follows:

online = about 5 lines of shell script that execute the ftpd binary
using a full path to the VCS mounted volume. 
offline = about 10 lines of shell script which determine the PIDs for
the ftp processes and kill them
monitor = about 10 lines of shell script which looks for the ftpd
processes, and if they are running return an exit code of 110 and if not
exits with 100
And i have copied the ScriptAgent binary into the Agent directory and
renamed it accordingly

When I manually mount the volume these 3 scripts do exactly what they
are supposed to and test all OK.

My problem is that the cluster seems to start fine, and the ftpd
application group also comes online, but the ftp server isnt started,
and i am not to sure why this is so. I would also have thought that the
monitor script would then notice this and cause the group to then fail.
I've done some debugging and from what i can find the commands within
the online scripts arent actually executed.

Another thing I dont quite understand is that my online and offline
scripts require no arguements passed to it via VCS. 
If i dont define any args in types.cf and main.cf i get configuration
errors when trying to start the cluster. So what i have done is used the
types.cf example from the devlopers guide and set the arguements in
main.cf to be nulls. This seems to be the workaround for my issues
there.

I have pasted the relevant parts below.
(This is my workaround)

from types.cf

type ncftpd (
        NameRule = resource.PathName;
        str PathName
        static str ArgList[] = { PathName };
)

from main.cf

ncftpd ncftpd_app (
        PathName = ""
        Enabled = "1"
        )


I've looked extensively online and havent been able to find any other
resources on writing custom VCS agents, if any of you could help me out
or point me in the right direction that would be great.

Regards,

Keiran

_______________________________________________
Veritas-ha maillist  -  Veritas-ha@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-ha

[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2655.35">
<TITLE>RE: [Veritas-ha] VCS Custom Agent/Application woes</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Check you file permissions for execute privileges.</FONT>
</P>

<P><FONT SIZE=2>Rafael Caraballo</FONT>
</P>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Keiran Sweet [<A \
HREF="mailto:KSweet@hutchison.com.au">mailto:KSweet@hutchison.com.au</A>]</FONT> \
<BR><FONT SIZE=2>Sent: Tuesday, September 09, 2003 9:44 PM</FONT> <BR><FONT \
SIZE=2>To: veritas-ha@mailman.eng.auburn.edu</FONT> <BR><FONT SIZE=2>Subject: \
[Veritas-ha] VCS Custom Agent/Application woes</FONT> </P>
<BR>

<P><FONT SIZE=2>Hi Everyone,</FONT>
</P>

<P><FONT SIZE=2>I'm currently working on setting up a custom agent for an ftp \
daemon</FONT> <BR><FONT SIZE=2>running under VCS 3.5 and&nbsp; have hit a snag which \
i am hoping some of you</FONT> <BR><FONT SIZE=2>guys and girls might be able to shed \
some light upon.</FONT> </P>

<P><FONT SIZE=2>My configuration is as follows:</FONT>
</P>

<P><FONT SIZE=2>Sun 280R running solaris 8 + VxVM + VxFS</FONT>
</P>

<P><FONT SIZE=2>I am currently developing this agent on a single node VCS cluster, so \
i</FONT> <BR><FONT SIZE=2>am starting VCS with hastart -onenode</FONT>
</P>

<P><FONT SIZE=2>I have created a volume that&nbsp; holds the binaries,configuration \
files</FONT> <BR><FONT SIZE=2>and home directories for the ftp daemon, this volume is \
setup to be</FONT> <BR><FONT SIZE=2>mounted by VCS and when the cluster starts (and \
the service group</FONT> <BR><FONT SIZE=2>starts), mounts all OK.</FONT>
</P>

<P><FONT SIZE=2>Output of hastatus -sum is below:</FONT>
</P>

<P><FONT SIZE=2># hastatus -sum</FONT>
</P>

<P><FONT SIZE=2>-- SYSTEM STATE</FONT>
<BR><FONT SIZE=2>-- System&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
State&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Frozen</FONT> </P>

<P><FONT SIZE=2>A&nbsp; \
sdfmvol1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
RUNNING&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
0</FONT> </P>

<P><FONT SIZE=2>-- GROUP STATE</FONT>
<BR><FONT SIZE=2>-- Group&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
System&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Probed&nbsp;&nbsp;&nbsp;&nbsp; AutoDisabled&nbsp;&nbsp; </FONT> <BR><FONT \
SIZE=2>State</FONT> </P>

<P><FONT SIZE=2>B&nbsp; ftpdgrp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
sdfmvol1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
N&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
</FONT> <BR><FONT SIZE=2>ONLINE</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>As per the Agent developers guide i have created the online, \
offline</FONT> <BR><FONT SIZE=2>and monitor entry points and they are as \
follows:</FONT> </P>

<P><FONT SIZE=2>online = about 5 lines of shell script that execute the ftpd \
binary</FONT> <BR><FONT SIZE=2>using a full path to the VCS mounted volume. </FONT>
<BR><FONT SIZE=2>offline = about 10 lines of shell script which determine the PIDs \
for</FONT> <BR><FONT SIZE=2>the ftp processes and kill them</FONT>
<BR><FONT SIZE=2>monitor = about 10 lines of shell script which looks for the \
ftpd</FONT> <BR><FONT SIZE=2>processes, and if they are running return an exit code \
of 110 and if not</FONT> <BR><FONT SIZE=2>exits with 100</FONT>
<BR><FONT SIZE=2>And i have copied the ScriptAgent binary into the Agent directory \
and</FONT> <BR><FONT SIZE=2>renamed it accordingly</FONT>
</P>

<P><FONT SIZE=2>When I manually mount the volume these 3 scripts do exactly what \
they</FONT> <BR><FONT SIZE=2>are supposed to and test all OK.</FONT>
</P>

<P><FONT SIZE=2>My problem is that the cluster seems to start fine, and the \
ftpd</FONT> <BR><FONT SIZE=2>application group also comes online, but the ftp server \
isnt started,</FONT> <BR><FONT SIZE=2>and i am not to sure why this is so. I would \
also have thought that the</FONT> <BR><FONT SIZE=2>monitor script would then notice \
this and cause the group to then fail.</FONT> <BR><FONT SIZE=2>I've done some \
debugging and from what i can find the commands within</FONT> <BR><FONT SIZE=2>the \
online scripts arent actually executed.</FONT> </P>

<P><FONT SIZE=2>Another thing I dont quite understand is that my online and \
offline</FONT> <BR><FONT SIZE=2>scripts require no arguements passed to it via VCS. \
</FONT> <BR><FONT SIZE=2>If i dont define any args in types.cf and main.cf i get \
configuration</FONT> <BR><FONT SIZE=2>errors when trying to start the cluster. So \
what i have done is used the</FONT> <BR><FONT SIZE=2>types.cf example from the \
devlopers guide and set the arguements in</FONT> <BR><FONT SIZE=2>main.cf to be \
nulls. This seems to be the workaround for my issues</FONT> <BR><FONT \
SIZE=2>there.</FONT> </P>

<P><FONT SIZE=2>I have pasted the relevant parts below.</FONT>
<BR><FONT SIZE=2>(This is my workaround)</FONT>
</P>

<P><FONT SIZE=2>from types.cf</FONT>
</P>

<P><FONT SIZE=2>type ncftpd (</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NameRule = \
resource.PathName;</FONT> <BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
str PathName</FONT> <BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
static str ArgList[] = { PathName };</FONT> <BR><FONT SIZE=2>)</FONT>
</P>

<P><FONT SIZE=2>from main.cf</FONT>
</P>

<P><FONT SIZE=2>ncftpd ncftpd_app (</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PathName = \
&quot;&quot;</FONT> <BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
Enabled = &quot;1&quot;</FONT> <BR><FONT \
SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )</FONT> </P>
<BR>

<P><FONT SIZE=2>I've looked extensively online and havent been able to find any \
other</FONT> <BR><FONT SIZE=2>resources on writing custom VCS agents, if any of you \
could help me out</FONT> <BR><FONT SIZE=2>or point me in the right direction that \
would be great.</FONT> </P>

<P><FONT SIZE=2>Regards,</FONT>
</P>

<P><FONT SIZE=2>Keiran</FONT>
</P>

<P><FONT SIZE=2>_______________________________________________</FONT>
<BR><FONT SIZE=2>Veritas-ha maillist&nbsp; -&nbsp; \
Veritas-ha@mailman.eng.auburn.edu</FONT> <BR><FONT SIZE=2><A \
HREF="http://mailman.eng.auburn.edu/mailman/listinfo/veritas-ha" \
TARGET="_blank">http://mailman.eng.auburn.edu/mailman/listinfo/veritas-ha</A></FONT> \
</P>

</BODY>
</HTML>


_______________________________________________
Veritas-ha maillist  -  Veritas-ha@mailman.eng.auburn.edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-ha

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic