<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"MS Gothic";
panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@MS Gothic";
panose-1:2 11 6 9 7 2 5 8 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> Christian Gebler [mailto:geblerchristian@googlemail.com] <br><b>Sent:</b> Tuesday, August 13, 2013 9:17 AM<br><b>To:</b> The Pacemaker cluster resource manager<br><b>Subject:</b> Re: [Pacemaker] 2 node Cluster<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>It works! Amazing....All the time I tried to fix it with the collocation. Thanks a lot for that solution! :)<o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Chris – I believe you were having issues because you had a resource set inside the colocation statement which causes the order of the elements to be reversed. When you have more than two like resources in a colo they become a set and are evaluate in reverse:<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:18.75pt;line-height:14.4pt;background:#FBFBFB;vertical-align:middle'><span style='font-size:10.5pt;font-family:"Courier New";color:#2E3436'>colocation col_psql-server_on_drbd inf: g_webserver p_psql-server p_ip ms_drbd_r2_drbd2:Master ms_drbd_r0_drbd0:Master ms_drbd_r1_drbd1:Master<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.4pt;background:#FBFBFB;vertical-align:middle'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>So the above was really collocating in this way:<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-indent:.5in;line-height:14.4pt;background:#FBFBFB;vertical-align:middle'><span style='font-size:10.5pt;font-family:"Courier New";color:#2E3436'>p_ip p_psql-server g_webserver ms_drbd_r1_drbd1:Master ms_drbd_r0_drbd0:Master ms_drbd_r2_drbd2:Master <o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.4pt;background:#FBFBFB;vertical-align:middle'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Only way to be sure would be/have been to run crm configure show xml. The xml output of the config will display the colocation statement in the order it is actually going to happen as opposed to the way it’s written in crmsh<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.4pt;background:#FBFBFB;vertical-align:middle'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>More conversation on that here: </span><a href="http://www.gossamer-threads.com/lists/linuxha/pacemaker/80622">http://www.gossamer-threads.com/lists/linuxha/pacemaker/80622</a><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.4pt;background:#FBFBFB;vertical-align:middle'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>HTH<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.4pt;background:#FBFBFB;vertical-align:middle'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Jake<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:14.4pt;background:#FBFBFB;vertical-align:middle'><span style='font-size:10.5pt;font-family:"Courier New";color:#2E3436'><o:p> </o:p></span></p><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal>2013/8/13 tech-ha <<a href="mailto:tech.ha01@gmail.com" target="_blank">tech.ha01@gmail.com</a>><o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div><div><p class=MsoNormal>a group instead of a collocation. in group, ip -> db -> nginx<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><br><span style='font-family:"Calibri","sans-serif"'>在</span> 2013-8-13<span style='font-family:"Calibri","sans-serif"'>,</span>17:56<span style='font-family:"Calibri","sans-serif"'>,</span>Christian Gebler <<a href="mailto:geblerchristian@googlemail.com" target="_blank">geblerchristian@googlemail.com</a>> <span style='font-family:"Calibri","sans-serif"'>写道:</span><o:p></o:p></p></div><div><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><div><div><p class=MsoNormal>Hi,<br><br>I am trying to set up a 2 node Pacemaker-Cluster with a few services (drbd, psql, ip, tomcat, nginx).<br>All these services should run on one node, all the time, if one service is down, everything must migrate to the other node.<br><br>So I created one colocation and one order, that works fine and all services run and migrate as expected. <br>But I have one problem...if I stop my Tomcat or Nginx (on the CRM CLI), the database and the ip goes down too, but that should not happen. I have no idea how to fix this problem, so I hope you can help me. Or is the only solution to unmanage the Service at first? <br><br>Thx!<o:p></o:p></p></div><p class=MsoNormal>Chris<o:p></o:p></p><div><p class=MsoNormal><br>Here is my Config:<br><br><a href="http://goo.gl/FkeqlH" target="_blank">http://goo.gl/FkeqlH</a><o:p></o:p></p></div></div></div></blockquote></div></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>_______________________________________________<o:p></o:p></p><div><p class=MsoNormal><br>Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org" target="_blank">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><o:p></o:p></p></div></div></blockquote></div><p class=MsoNormal style='margin-bottom:12.0pt'><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><o:p></o:p></p></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>