[Pacemaker] Finally. A REAL question.

Andrew Beekhof andrew at beekhof.net
Mon Nov 18 23:50:39 UTC 2013


On 19 Nov 2013, at 10:30 am, Rob Thomas <xrobau at gmail.com> wrote:

> On Tue, Nov 19, 2013 at 8:55 AM, Andrew Beekhof <andrew at beekhof.net> wrote:
>> 
>> 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>
>> 
>> is almost right, but misses score=INFINITY in the rsc_colocation tag.
> 
> Ah. And that would have been why it didn't shut down httpd. When I
> tried that, I wasn't looking at the raw XML to see what pcs was
> actually doing.
> 
>> Note that this is very different to the command I asked you about:
>> 
>>   pcs constraint colocation add asterisk with httpd
>> 
>> Which creates something more like:
>> 
>>   <rsc_colocation id="pcs_rsc_colocation" rsc="asterisk" with-rsc="httpd" score="INFINITY"/>
> 
> Yep. I replied to that earlier.

Oh, you mean you tried that way too?
It wasn't clear because the xml only had the 'set' variant present.

> 
> --snip--
> Yep. It ends up with asterisk stopped, and httpd happily running on -a
> (and it won't start, because the colocation docs say 'if z is not
> running, y won't start', so that makes sense)
> 
> 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):    Stopped
>     asterisk_ip        (ocf::heartbeat:IPaddr2):       Stopped
>     asterisk_service   (ocf::heartbeat:freepbx):       Stopped
> 
> Failed actions:
>    asterisk_service_monitor_30000 on freepbx-a 'not running' (7):
> call=2217, status=complete, last-rc-change='Mon Nov 18 14:05:08 2013',
> queued=0ms, exec=0ms
> 
> I've been browsing through the cluster.log, and it's not even trying
> to move httpd.  I'm almost certain that it used to work fine with
> resource sets. Hmm.
> --snip--
> 
> After I posted that, I then went and had an actual look at a working
> cluster, and realised exactly how I was doing it, and posted the next
> message.
> 
> I'll have a try with the setoptions and see if that works. Thanks!
> 
> --Rob
> 
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20131119/c1259f1a/attachment-0004.sig>


More information about the Pacemaker mailing list