<div dir="ltr">>>> On 19 Nov 2013, at 6:00 am, Rob Thomas <<a href="mailto:xrobau@gmail.com">xrobau@gmail.com</a>> wrote:<br>>>>> So... What's the -right- way to do it then? 8)<br>>>><br>
>>>      <rsc_colocation id="pcs_rsc_colocation"><br>>>>        <resource_set id="pcs_rsc_set"><br>>>>          <resource_ref id="httpd"/><br>>>>          <resource_ref id="asterisk"/><br>
>>>        </resource_set><br>>>>      </rsc_colocation><br><br>... <br><br>>> I'll have a try with the setoptions and see if that works. Thanks!<br><br>Without adding the ms resource, it won't fail the other service over completely.<br>
<br>This works (which is a LITTLE bit more pleasing to the eyes, hopefully! I even set the font to monospace!)<br><br><font face="courier new, monospace"><rsc_colocation id="pcs_rsc_colocation" score="INFINITY"><br>
  <resource_set id="pcs_rsc_set-1"><br>    <resource_ref id="httpd"/><br>    <resource_ref id="asterisk"/></font><div><font face="courier new, monospace">  </resource_set><br>
  <resource_set id="pcs_rsc_set-2" role="Master"><br>     <resource_ref id="ms-asterisk"/><br>     <resource_ref id="ms-httpd"/><br>  </resource_set><br></rsc_colocation><br>
</font><br>I'm still pretty sure you can't do that through pcs. </div><div><br></div><div>And the reason why (I believe) I need them, to go into a bit more depth - (sorry for everyone else who's getting bored with this incredibly arcane and in-depth discussion, that has degenerated into pasting XML snippets everywhere) here's the relevant associated constraints:</div>
<div><br></div><div><div><rsc_colocation id="c-1" rsc="asterisk_fs" score="INFINITY" with-rsc="ms-asterisk" with-rsc-role="Master"/></div><div><rsc_order first="ms-asterisk" first-action="promote" id="o-1" score="INFINITY" then="asterisk_fs" then-action="start"/></div>
<div><rsc_colocation id="c-2" rsc="httpd_fs" score="INFINITY" with-rsc="ms-httpd" with-rsc-role="Master"/><br></div><div><rsc_order first="ms-httpd" first-action="promote" id="o-2" score="INFINITY" then="httpd_fs" then-action="start"/></div>
<div><br></div></div><div>(id's changed to aid reading) </div><div><br></div><div>Without pcs_rsc_set-2 before failing:</div><div><br></div><div><div> Master/Slave Set: ms-asterisk [drbd_asterisk]</div><div>     Masters: [ freepbx-a ]</div>
<div>     Slaves: [ freepbx-b ]</div></div><div> Master/Slave Set: ms-httpd [drbd_httpd]<br></div><div><div>     Masters: [ freepbx-a ]</div><div>     Slaves: [ freepbx-b ]</div></div><div><div> Resource Group: httpd</div>
<div>     httpd_fs   (ocf::heartbeat:Filesystem):    Started freepbx-a</div><div>     httpd_ip   (ocf::heartbeat:IPaddr2):       Started freepbx-a</div><div>     httpd_service      (ocf::heartbeat:apache):        Started freepbx-a</div>
<div><div> Resource Group: asterisk</div><div>     asterisk_fs        (ocf::heartbeat:Filesystem):    Started freepbx-a</div><div>     asterisk_ip        (ocf::heartbeat:IPaddr2):       Started freepbx-a</div><div>     asterisk_service   (ocf::heartbeat:freepbx):       Started freepbx-a</div>
<div>     isymphony_service  (lsb:iSymphonyServer):  Started freepbx-a</div></div><div><br></div><div>AFTER failing:</div><div><br></div><div><div> Master/Slave Set: ms-asterisk [drbd_asterisk]</div><div>     Masters: [ freepbx-a ]  <---------- THIS IS WRONG</div>
<div>     Slaves: [ freepbx-b ]</div></div><div><div> Master/Slave Set: ms-httpd [drbd_httpd]</div><div>     Masters: [ freepbx-b ]</div><div>     Slaves: [ freepbx-a ]</div></div><div><div> Resource Group: asterisk</div>
<div>     asterisk_fs        (ocf::heartbeat:Filesystem):    Stopped</div><div>     asterisk_ip        (ocf::heartbeat:IPaddr2):       Stopped</div><div>     asterisk_service   (ocf::heartbeat:freepbx):       Stopped</div>
<div>     isymphony_service  (lsb:iSymphonyServer):  Stopped</div><div> Resource Group: httpd</div><div>     httpd_fs   (ocf::heartbeat:Filesystem):    Started freepbx-b</div><div>     httpd_ip   (ocf::heartbeat:IPaddr2):       Started freepbx-b</div>
<div>     httpd_service      (ocf::heartbeat:apache):        Started freepbx-b</div></div><div><br></div><div>The asterisk group isn't starting because - obviously - it's not the master for ms-asterisk.  So the constraint worked, BUT, because I don't have the resource in there, I can't tell it to shut down.</div>
<div><br></div><div>My other idea was having the ms- ordering start the group, but that doesn't work either. </div><div><br></div></div><div>--Rob</div></div>