[Linux-ha-dev] LRM Testing (take 2)

Alan Robertson alanr at unix.sh
Fri Jun 11 09:28:18 MDT 2004


Andrew wrote:
> 
> On Jun 11, 2004, at 4:45 PM, Andrew wrote:
> 
>>
>> On Jun 11, 2004, at 4:06 PM, Alan Robertson wrote:
>>
>>> Jiang Dong Sun wrote:
>>>
>>>> Ok, according to the popular opinion, will change the "uuid"'s format.
>>>> Before that, please tolerate the inconvenience brought by UUID in 
>>>> LRM for a while. ;-)
>>>
>>>
>>>
>>>
>>> I'm sorry I was off the list fixing hardware while all this went on...
>>>
>>> The UUID format is the right answer...  It is a standard, actually, 
>>> and we should just use it.
>>>
>>> Don't mess with it.
>>>
>>> However, it is NOT a string, and cannot be strcmp()ed...  You can use 
>>> a string provided you NULL-pad the string in every case...
>>>
>>> It is a binary value of 128 bits.
>>>
>>> Making it of arbitrary length overly complicates the interface 
>>> because you now have to pass the length everywhere you use it - 
>>> BECAUSE IT IS BINARY, not a string.
>>
>>
>> Two questions:
>>
>> Why is a UUID automatically the right type for a resource ID?  I still 
>> dont see the benefit over a char*.
> 
> 
> In the interests of clarity, that should say:
> 
> Why is a UUID automatically the right type for a resource ID?  I still 
> dont see the benefit over a UID in the form of a human intelligible 
> char* (such as prod_intra_apache1).


Because UUIDs are guaranteed to be unique. Strings are not.  You're more 
than welcome to keep a corresponding human string, and I'd recommend it. 
For testing, you can make them the same (if you pad with zeros).

-- 
     Alan Robertson <alanr at unix.sh>

"Openness is the foundation and preservative of friendship...  Let me claim 
from you at all times your undisguised opinions." - William Wilberforce



More information about the Linux-HA-Dev mailing list