[Linux-cluster] clustered web service using Apache resource?

Liam Forbes loforbes at alaska.edu
Thu Nov 17 19:29:48 UTC 2011


On Thu, Nov 17, 2011 at 1:02 AM,  <Ralph.Grothe at itdz-berlin.de> wrote:
>> -----Original Message-----
>> From: linux-cluster-bounces at redhat.com
>> [mailto:linux-cluster-bounces at redhat.com] On Behalf Of Liam Forbes
>> Sent: Wednesday, November 16, 2011 21:36
>> To: linux-cluster at redhat.com
>> Subject: [Linux-cluster] clustered web service using Apache resource?
>>
>> Hello,
>>
>> I've set up a 5 node cluster using RHEL 6.1 and the HA & Resilient
>> Storage add-ons, with one service group (so far) containing an IP
>> address resource and an Apache resource.  The service is working fine,
>> but only on the first node (which happens to be where luci is
>> running).
>
> What does a "clustat" issued on the node where the resource is
> active display?

[lforbes at hatest1 ~]$ sudo clustat
Cluster Status for hatest @ Tue Nov 15 16:17:54 2011
Member Status: Quorate

 Member Name                             ID   Status
 ------ ----                             ---- ------
 hatest1-m                                   1 Online, Local, rgmanager
 hatest2-m                                   2 Online, rgmanager
 hatest3-m                                   3 Online, rgmanager
 hatest4-m                                   4 Online, rgmanager
 hatest5-m                                   5 Online, rgmanager

 Service Name                   Owner (Last)                   State
 ------- ----                   ----- ------                   -----
 service:bbtest                 hatest1-m                      started

> Can clustat be issued on the other nodes (especially those which
> are part of the failover domain of the service that the apache
> resource belongs to) as well?

Yes.

>> All the /etc/cluster/cluster.conf files match, but I only
>> see the /etc/cluster/apache directory on that node.
>
> That sounds queer to me.
> Usually such a directory doesn't exist.
> Is that where you have your shared storage (LV/GFS), i.e. fs
> resource, of your webserver service mounted?

No.  It appears to be created when a service with the Apache resource
is started on a node.

> I would rather choose a different mountpoint.
> But I seem to understand why you want to mount it in that place.
> You only want to keep one central httpd.conf file I guess?

No, I'm developing individual httpd.conf files, but they will all
reside in the same GFS2 filesystem (/datafs).

> In the shell see "clusvcadm -h" for usage info.
> You could also relocate from the shell by something like e.g.
>
> # clusvcadm -r <name_of_your_webserver_service> -m
> <name_of_a_node_from_your_failover_domain>
>
> From another shell terminal you could follow the relocation
> progress by e.g.
>
> # clustat -i3

I tried a `clusvcadm -r -m`  this morning.  And it works.

[lforbes at hatest1 ~]$ sudo clusvcadm -r bbtest -m hatest4-m
Trying to relocate service:bbtest to hatest4-m...Success
[lforbes at hatest1 ~]$ sudo clustat
Cluster Status for hatest @ Thu Nov 17 10:13:04 2011
Member Status: Quorate

 Member Name                             ID   Status
 ------ ----                             ---- ------
 hatest1-m                                   1 Online, Local, rgmanager
 hatest2-m                                   2 Online, rgmanager
 hatest3-m                                   3 Online, rgmanager
 hatest4-m                                   4 Online, rgmanager
 hatest5-m                                   5 Online, rgmanager

 Service Name                   Owner (Last)                   State
 ------- ----                   ----- ------                   -----
 service:bbtest                 hatest4-m                      started

So it appears that using the drop down menu in Conga to select a node
and relocate the service to that node as part of a restart is not
working.  When I do that, the service just restarts on whatever node
it's already running on (and it's very obvious in the rgmanager log
file).  The drop down menu isn't being honored.

> I would assume because the RHCS apache RA is taylored at the
> httpd RPM from the RHEL repository.
> As said, I'm not using the apache RA so far.
> But I encountered a similar issue with the RHCS tomcat RA.
> Because our customer wished a special Tomcat release build with
> different paths, starting/stopping scripts, environment etc. it
> would have been much more work to adapt the RHCS tomcat RA to
> those special needs than providing an own script RA script.

I am using the Red Hat httpd RPM.  But I see your point and it makes sense.

Maybe a little more documentation on the intended use, and how to use,
each resource agent in the Cluster Administration guide would be very
helpful for newbs like myself.

-- 
Regards,
-liam

-There are uncountably more irrational fears than rational ones. -P. Dolan
Liam Forbes       HPC Systems Analyst,      HPC&S Group Leader,      CISSP
ARSC, U of AK, Fairbanks   lforbes at arsc.edu 907-450-8618 fax: 907-450-8605




More information about the Linux-cluster mailing list