[Linux-cluster] one click to start httpd on all nodes - possible?
Marek 'marx' Grac
mgrac at redhat.com
Thu Aug 28 14:27:21 UTC 2008
> Hi marx,
> Many thanks for your reply. This is not working for me. let simplify with 2
> nodes. I created a service and a resource, as you suggest:
> [snip from cluster.conf]
> <service autostart="1" exclusive="0" name="httpd_service">
> <script ref="httpd_script"/>
> <script file="/etc/rc.d/init.d/httpd" name="httpd_script"/>
> [end snip]
> Now, supposing that httpd_service is running on one node, clusvcadm -d
> httpd_service will disable service and stop httpd on that node, but clusvcadm
> -e httpd_service will enable service on the node where is issued command and
> will not start service also on the second node...so, as i said, is a failover
> configuration. I want to be able to controll httpd in parallel on all nodes!
> So, what is missing from my above cluster.conf setup?
Service is defined for whole cluster, so you need different services.
This is why you usually have to run them with
different commands. But still using your approach you will lost the main
benefit - high availability - main reason for using
cluster suite for me :) I prefer to use resource 'apache' because then
you can have several apaches on different IP address on
one server (in any of them fail). Steps for this path should be define
service for each httpd and define failover domain for each
service (with different priority - so they will run on different nodes
if possible). After this you can use clusvcadm -e service and it
will run on correct nodes.
Red Hat Czech s.r.o.
More information about the Linux-cluster