[Pacemaker] Finally. A REAL question.

Rob Thomas xrobau at gmail.com
Mon Nov 18 22:50:44 EST 2013


>>> On 19 Nov 2013, at 6:00 am, Rob Thomas <xrobau at gmail.com> wrote:
>>>> So... What's the -right- way to do it then? 8)
>>>
>>>      <rsc_colocation id="pcs_rsc_colocation">
>>>        <resource_set id="pcs_rsc_set">
>>>          <resource_ref id="httpd"/>
>>>          <resource_ref id="asterisk"/>
>>>        </resource_set>
>>>      </rsc_colocation>

...

>> I'll have a try with the setoptions and see if that works. Thanks!

Without adding the ms resource, it won't fail the other service over
completely.

This works (which is a LITTLE bit more pleasing to the eyes, hopefully! I
even set the font to monospace!)

<rsc_colocation id="pcs_rsc_colocation" score="INFINITY">
  <resource_set id="pcs_rsc_set-1">
    <resource_ref id="httpd"/>
    <resource_ref id="asterisk"/>
  </resource_set>
  <resource_set id="pcs_rsc_set-2" role="Master">
     <resource_ref id="ms-asterisk"/>
     <resource_ref id="ms-httpd"/>
  </resource_set>
</rsc_colocation>

I'm still pretty sure you can't do that through pcs.

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:

<rsc_colocation id="c-1" rsc="asterisk_fs" score="INFINITY"
with-rsc="ms-asterisk" with-rsc-role="Master"/>
<rsc_order first="ms-asterisk" first-action="promote" id="o-1"
score="INFINITY" then="asterisk_fs" then-action="start"/>
<rsc_colocation id="c-2" rsc="httpd_fs" score="INFINITY"
with-rsc="ms-httpd" with-rsc-role="Master"/>
<rsc_order first="ms-httpd" first-action="promote" id="o-2"
score="INFINITY" then="httpd_fs" then-action="start"/>

(id's changed to aid reading)

Without pcs_rsc_set-2 before failing:

 Master/Slave Set: ms-asterisk [drbd_asterisk]
     Masters: [ freepbx-a ]
     Slaves: [ freepbx-b ]
 Master/Slave Set: ms-httpd [drbd_httpd]
     Masters: [ freepbx-a ]
     Slaves: [ freepbx-b ]
 Resource Group: httpd
     httpd_fs   (ocf::heartbeat:Filesystem):    Started freepbx-a
     httpd_ip   (ocf::heartbeat:IPaddr2):       Started freepbx-a
     httpd_service      (ocf::heartbeat:apache):        Started freepbx-a
 Resource Group: asterisk
     asterisk_fs        (ocf::heartbeat:Filesystem):    Started freepbx-a
     asterisk_ip        (ocf::heartbeat:IPaddr2):       Started freepbx-a
     asterisk_service   (ocf::heartbeat:freepbx):       Started freepbx-a
     isymphony_service  (lsb:iSymphonyServer):  Started freepbx-a

AFTER failing:

 Master/Slave Set: ms-asterisk [drbd_asterisk]
     Masters: [ freepbx-a ]  <---------- THIS IS WRONG
     Slaves: [ freepbx-b ]
 Master/Slave Set: ms-httpd [drbd_httpd]
     Masters: [ freepbx-b ]
     Slaves: [ freepbx-a ]
 Resource Group: asterisk
     asterisk_fs        (ocf::heartbeat:Filesystem):    Stopped
     asterisk_ip        (ocf::heartbeat:IPaddr2):       Stopped
     asterisk_service   (ocf::heartbeat:freepbx):       Stopped
     isymphony_service  (lsb:iSymphonyServer):  Stopped
 Resource Group: httpd
     httpd_fs   (ocf::heartbeat:Filesystem):    Started freepbx-b
     httpd_ip   (ocf::heartbeat:IPaddr2):       Started freepbx-b
     httpd_service      (ocf::heartbeat:apache):        Started freepbx-b

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.

My other idea was having the ms- ordering start the group, but that doesn't
work either.

--Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20131119/5f6945ef/attachment-0003.html>


More information about the Pacemaker mailing list