[Linux-HA] Understanding the behavior of IPaddr2 clone
William Seligman
seligman at nevis.columbia.edu
Mon Feb 27 15:47:01 MST 2012
On 2/27/12 5:41 PM, William Seligman wrote:
> On 2/27/12 5:33 PM, Lars Ellenberg wrote:
>> On Mon, Feb 27, 2012 at 05:23:36PM -0500, William Seligman wrote:
>>> On 2/27/12 4:10 PM, Lars Ellenberg wrote:
>>>> On Mon, Feb 27, 2012 at 03:39:04PM -0500, William Seligman wrote:
>>>>> On 2/24/12 3:36 PM, William Seligman wrote:
>>>>>> On 2/17/12 7:30 AM, Dejan Muhamedagic wrote:
>>>>>
>>>>>>> OK, I guess that'd also be doable by checking the following
>>>>>>> variables:
>>>>>>>
>>>>>>> OCF_RESKEY_CRM_meta_notify_inactive_resource (set of
>>>>>>> currently inactive instances)
>>>>>>> OCF_RESKEY_CRM_meta_notify_stop_resource (set of
>>>>>>> instances which were just stopped)
>>>>>>>
>>>>>>> Any volunteers for a patch? :)
>>>>>>
>>>>>> a) I have a test cluster that I can bring up and down at will;
>>>>>>
>>>>>> b) I'm a glutton for punishment.
>>>>>>
>>>>>> So I'll volunteer, since I offered to try to do something in the first place. I
>>>>>> think I've got a handle on what to look for; e.g., one has to look for
>>>>>> notify_type="pre" and notify_operation="stop" in the 'node_down' test.
>>>>>
>>>>> Here's my patch, in my usual overly-commented style.
>>>>
>>>> Sorry, I may be missing something obvious, but...
>>>>
>>>> is this not *the* use case of globally-unique=true?
>>>
>>> I did not know about globally-unique. I just tested it, replacing (with name
>>> substitutions):
>>>
>>> clone ipaddr2_clone ipaddr2_resource meta notify="true"
>>>
>>> with
>>>
>>> clone ipaddr2_clone ipaddr2_resource meta globally-unique="true"
>>>
>>> This fell back to the old behavior I described in the first message in this
>>> thread: iptables did not update when I took down one of my nodes.
>>>
>>> I expected this, since according to "Pacemaker Explained",
>>> globally-unique="true" is the default. If this had worked, I never would have
>>> reported the problem in the first place.
>>>
>>> Is there something else that could suppress the behavior you described for
>>> globally-unique=true?
>>>
>>
>> You need clone-node-max == clone-max.
>>
>> It defaults to 1.
>>
>> Which obviously prevents nodes already running one
>> instance from taking over an other...
>
> I tried it, and it works. So there's no need for my patch. The magic invocation
> for a highly-available IPaddr2 resource is:
>
> ip_clone ip_resource meta clone-max=2 clone-node-max=2
>
> Could this please be documented more clearly somewhere?
Umm... it turns out to be:
ip_clone ip_resource meta globally-unique="true" clone-max=2 clone-node-max=2
and for a two-node cluster, of course.
So I guess globally-unique="true" is not the default after all.
--
Bill Seligman | Phone: (914) 591-2823
Nevis Labs, Columbia Univ | mailto://seligman@nevis.columbia.edu
PO Box 137 |
Irvington NY 10533 USA | http://www.nevis.columbia.edu/~seligman/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4497 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.linux-ha.org/pipermail/linux-ha/attachments/20120227/76fabedc/attachment.bin
More information about the Linux-HA
mailing list