Hello Jakov<br><br>rgmanager has an internal order and this order is used to know what the services (start|stod) sequence<br><br>vim +/special/ /usr/share/cluster/service.sh<br><br>So sometime force i the hierarchy in the service definetion is not needed<br>
<br><div class="gmail_quote">2013/2/18 Jakov Sosic <span dir="ltr"><<a href="mailto:jsosic@srce.hr" target="_blank">jsosic@srce.hr</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi.<br>
<br>
First of all, I'm running CentOS 6.3. Now, my problem is the following.<br>
I have this kind of resource tree in my service:<br>
<br>
<service autostart="0" domain="domain12" name="pgmaster"><br>
   <ip ref="192.168.50.101"><br>
      <ip ref="10.200.200.101"><br>
         <fs ref="intern"><br>
            <postgres-8 ref="pgmaster"/><br>
         </fs><br>
      </ip><br>
   </ip><br>
</service><br>
<br>
<br>
This configuration in cluster.conf starts postgresql in a way that<br>
database listens only on the first ip address of the service<br>
(listen='192.168.50.101').<br>
<br>
If I reorder the code to look like this:<br>
<br>
<br>
<service autostart="0" domain="domain12" name="pgmaster"><br>
   <fs ref="intern"><br>
      <ip ref="192.168.50.101"><br>
         <ip ref="10.200.200.101"><br>
            <postgres-8 ref="pgmaster"/><br>
         </ip><br>
      </ip><br>
   </fs><br>
</service><br>
<br>
then postgres can't even start because no IP address was found (listen='').<br>
<br>
So, script obviously checks only first level of hierarchy in the<br>
cluster.conf.<br>
<br>
I've examined the script further, and found out that postgres-8.sh uses<br>
bash function 'build_ip_list()' from "config-utils.sh" script.<br>
<br>
That function iterates through ip's, by using ccs_tool, like this:<br>
<br>
# ccs_tool query '/cluster/rm/service[@name="pgmaster"]/ip[$x]/@ref'<br>
<br>
$x is integer that equals 1, and is being iterated until ccs_tool<br>
returns error.<br>
<br>
In the first case presented, this is the output that I get:<br>
<br>
# ccs_tool query '/cluster/rm/service[@name="pgmaster"]/ip[1]/@ref'<br>
192.168.50.101<br>
<br>
# echo $?<br>
0<br>
<br>
# ccs_tool query '/cluster/rm/service[@name="pgmaster"]/ip[2]/@ref'<br>
Query failed: Invalid argument<br>
<br>
# echo $?<br>
1<br>
<br>
<br>
Now, for the current state of scripts to work ok, I have to model my<br>
service in this manner:<br>
<br>
<service autostart="0" domain="domain12" name="pgmaster"><br>
   <ip ref="192.168.50.101"/><br>
   <ip ref="10.200.200.101"/><br>
   <fs ref="intern"><br>
      <postgres-8 ref="pgmaster"/><br>
   </fs><br>
</service><br>
<br>
Now both IP addresses get figured out by ccs_tool query, and postgresql<br>
starts fine with listen='192.168.50.101,10.200.200.101'.<br>
<br>
<br>
My question is, is this a bug, or should I always put all my ip<br>
addresses at the root level of service hierarchy, out of dependency tree?<br>
<br>
And is this a problem for a service, I mean, what is the ordering in<br>
which resources are started? In this scenario if the order of execution<br>
of resources isn't deterministic but random, there is a possibility for<br>
a service to fail, if IP addresses didn't get up before the service started.<br>
<br>
If that's not the case, and if ip addresses have to be in the dependency<br>
relation to other resources, then "config-utils.sh" script should have<br>
to be rewritten, in a way that searches for IP addresses deeply in a<br>
hierarchy and not only at root level...<br>
<br>
<br>
<br>
<br>
Thank you for all your comments.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Linux-cluster mailing list<br>
<a href="mailto:Linux-cluster@redhat.com">Linux-cluster@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/linux-cluster" target="_blank">https://www.redhat.com/mailman/listinfo/linux-cluster</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>esta es mi vida e me la vivo hasta que dios quiera