<div dir="ltr"><div><div><div><div><div>Hi again...<br><br>I mean, running a script when some host down...<br></div>Let make me clear...<br></div>I have two nodes: pve01 and pve02<br></div>I need run a script on pve01 when pve02 down...<br>
</div>I found some answer on google, like this:<br><br><pre><font><span style="font-family:arial,helvetica,sans-serif"><failoverdomains>
<failoverdomain name="node1-domain" restricted="1">
<failoverdomainnode name="<a href="http://node1.example.com" target="_blank">node1.example.com</a>"/>
</failoverdomain>
<failoverdomain name="node2-domain" restricted="1">
<failoverdomainnode name="<a href="http://node2.example.com" target="_blank">node2.example.com</a>"/>
</failoverdomain>
<failoverdomain name="node3-domain" restricted="1">
<failoverdomainnode name="<a href="http://node3.example.com" target="_blank">node3.example.com</a>"/>
</failoverdomain>
</failoverdomains>
<resources>
<!-- This script starts a qpidd broker acting as a backup. -->
<script file="/etc/init.d/qpidd" name="qpidd"/>
<!-- This script promotes the qpidd broker on this node to primary. -->
<script file="/etc/init.d/qpidd-primary" name="qpidd-primary"/>
<!-- This is a virtual IP address for client traffic. -->
<ip address="20.0.20.200" monitor_link="1"/>
</resources>
<!-- There is a qpidd service on each node, it should be restarted if it fails. -->
<service name="node1-qpidd-service" domain="node1-domain" recovery="restart">
<script ref="qpidd"/>
</service>
<service name="node2-qpidd-service" domain="node2-domain" recovery="restart">
<script ref="qpidd"/>
</service>
<service name="node3-qpidd-service" domain="node3-domain" recovery="restart">
<script ref="qpidd"/>
</service>
<!-- There should always be a single qpidd-primary service, it can run on any node. -->
<service name="qpidd-primary-service" autostart="1" exclusive="0" recovery="relocate">
<script ref="qpidd-primary"/>
<!-- The primary has the IP addresses for brokers and clients to connect. -->
<ip ref="20.0.20.200"/>
</service><br><br><br></span></font></pre><font><font face="arial,helvetica,sans-serif">But everytime I </font></font>change the cluster.conf and try validate the file, the validation go on 'till get a timeout or 'till I press Control + C...<br>
</div><div>After that, one node goes down... Even when I reboot the system, cman run in Timeout error and /etc/pve is mounted as read-only...<br><br></div><div>I don't know if this happen because I'm using VirtualBox to test the system or this is kind a bug...<br>
<br></div><div>Thanks<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-27 9:19 GMT-03:00 Dietmar Maurer <span dir="ltr"><<a href="mailto:dietmar@proxmox.com" target="_blank">dietmar@proxmox.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">> I suppose that with resource and script I can define some script to run on<br>
> certain node... Is that right?<br>
<br>
</div>If you want to run a script on a specific node you can simple setup and init script (no need for rgmanager).<br>
<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Gilberto Ferreira<br>
</div>