<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 &lt;&lt;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 (&#39; .. not installed&#39;) ?<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">&lt;<a href="mailto:dejanmm@fastmail.fm" target="_blank">dejanmm@fastmail.fm</a>&gt;</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>
&gt; hi,<br>
&gt; in examples using crmsh to create a resource with constraints is an<br>
&gt; interactive mode is used<br>
&gt;<br>
&gt; crm configure edit<br>
&gt;   &gt; primitive   B<br>
&gt;   &gt; order        B_after_A<br>
&gt;   &gt; colocation B_on_A<br>
&gt;   &gt; commit<br>
&gt;   &gt; end<br>
&gt;  quit<br>
&gt;<br>
&gt; when resource B depends on another resource A that is running once on Node0<br>
&gt; (or as master/slave on both nodes, as master on Node0, slave on Node1)<br>
&gt; and i call<br>
&gt; `crm configure primitive B ...`<br>
&gt;<br>
&gt; will in first attempt (not necessarily) the new resource A started on Node1<br>
&gt; till i define the constraints<br>
&gt; `crm configure colocation c_B_on_A inf: B A`<br>
&gt; ?<br>
<br>
</div>Yes.<br>
<div class="im"><br>
&gt; and is this the reason for a &#39;failed action&#39; on Node1<br>
&gt; that can get cleaned up with `crm_resource -P` for instance ?<br>
&gt;<br>
&gt; how can i achieve such a session-like creation of a resource with<br>
&gt; constraints<br>
&gt; from out of a script ? ( i have prepared for each resource a s_xxx.sh and<br>
&gt; k_xxx.sh (start/kill)<br>
&gt; to add and remove .. )<br>
<br>
</div>Use the here-document:<br>
<br>
crm configure &lt;&lt;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&#39;t need commit or quit.<br>
<br>
Thanks,<br>
<br>
Dejan<br>
<br>
<br>
<br>
&gt; thanks in advance<br>
&gt; andreas<br>
<div class="HOEnZb"><div class="h5"><br>
&gt; _______________________________________________<br>
&gt; Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
&gt; <a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
&gt;<br>
&gt; Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
&gt; 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>
&gt; 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>