<div dir="ltr"><div><div><div><div><br>thanks awfully for all your answers.<br></div>i started reading about ha/cluster/drbd/pacemaker/.. two weeks ago. it is not yet easy to precise my questions.<br></div><div><br></div><div>
different os on test-environment only, but i already decided to have equal os for testing, too. <br></div><div>crm configure <<EOF .. # great !!! <br><br></div><div>my situation: two Nodes n1,n2 and all services (that must not run twice, and are managed by pacemaker) run on one node only. the other <br>
</div>shall take over in case the first fails. cause both machines are running, you may say, that some services run on n1, others on n2. but this moment<br></div>i have only some services that depend on drbd:Master + IPaddr + Filesystem, so they have to run on one node. the rest (for today) is simply running on both nodes<br>
</div>or not (pacemaker is not aware of).<br><div class="gmail_extra"><br></div><div class="gmail_extra">but a new question (to come closer to understand in full depth ..ö..) <br></div><div class="gmail_extra">when using location-constraints (more than two nodes and on one node a service (its binary) does not exists, negative location-constraint ) <br>
</div><div class="gmail_extra">would the resource-manager not complain about missing service (' .. not installed') ?<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">thanks<br>andreas<br></div>
<div class="gmail_extra"><div class="gmail_quote">2013/6/6 Dejan Muhamedagic <span dir="ltr"><<a href="mailto:dejanmm@fastmail.fm" target="_blank">dejanmm@fastmail.fm</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<div class="im"><br>
On Thu, Jun 06, 2013 at 02:28:45PM +0200, andreas graeper wrote:<br>
> hi,<br>
> in examples using crmsh to create a resource with constraints is an<br>
> interactive mode is used<br>
><br>
> crm configure edit<br>
>   > primitive   B<br>
>   > order        B_after_A<br>
>   > colocation B_on_A<br>
>   > commit<br>
>   > end<br>
>  quit<br>
><br>
> when resource B depends on another resource A that is running once on Node0<br>
> (or as master/slave on both nodes, as master on Node0, slave on Node1)<br>
> and i call<br>
> `crm configure primitive B ...`<br>
><br>
> will in first attempt (not necessarily) the new resource A started on Node1<br>
> till i define the constraints<br>
> `crm configure colocation c_B_on_A inf: B A`<br>
> ?<br>
<br>
</div>Yes.<br>
<div class="im"><br>
> and is this the reason for a 'failed action' on Node1<br>
> that can get cleaned up with `crm_resource -P` for instance ?<br>
><br>
> how can i achieve such a session-like creation of a resource with<br>
> constraints<br>
> from out of a script ? ( i have prepared for each resource a s_xxx.sh and<br>
> k_xxx.sh (start/kill)<br>
> to add and remove .. )<br>
<br>
</div>Use the here-document:<br>
<br>
crm configure <<EOF<br>
<div class="im">primitive   B<br>
order        B_after_A<br>
colocation B_on_A<br>
</div>EOF<br>
<br>
Note that you don't need commit or quit.<br>
<br>
Thanks,<br>
<br>
Dejan<br>
<br>
<br>
<br>
> thanks in advance<br>
> andreas<br>
<div class="HOEnZb"><div class="h5"><br>
> _______________________________________________<br>
> Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
> <a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
><br>
> Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
> Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
> Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
<br>
<br>
_______________________________________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
<a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" target="_blank">http://bugs.clusterlabs.org</a><br>
</div></div></blockquote></div><br></div></div>