
lists at beekhof
Jun 11, 2004, 9:55 AM
Post #22 of 42
(3784 views)
Permalink
|
On Jun 11, 2004, at 5:28 PM, Alan Robertson wrote: > 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). Without checking with the boss first, I think we'll end up storing uuid, id, and description in the CIB. description being for admin tools. "uuid" being generated internally for the LRM and "id" being for logs, humans and the CRM. The reason i plan to use id in the CRM is that either way I have to check the values are unique (evil users may have tinkered with the CIB) and the uuid (IMHO) is all but useless in a logfile. So if I'm logging "id" and they are both unique, then I may as well just use "id" and ensure that the value sent to the logs is the one the CRM is making decisions with. Care to veto any of that lmb? > > -- > Alan Robertson <alanr [at] unix> > > "Openness is the foundation and preservative of friendship... Let me > claim from you at all times your undisguised opinions." - William > Wilberforce > > _______________________________________________________ > Linux-HA-Dev: Linux-HA-Dev [at] lists > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > Home Page: http://linux-ha.org/
|