On 3/30/06, James Pan <[EMAIL PROTECTED]> wrote: > Let me make it clearer: NONE half resource will be attempted to be added > to the CIB. > All the resources submitted to the CIB will be definitetly complete, If > a s user try to add a incomplete resource > to the CIB, the Providers raise a big ERROR. > During the creation, incomplete resource may exist, but only in the CIM > layer. and this information > will be cached, managed and only used by the CIM Providers. > > Does this bother your?
Yes, but instead of arguing about it I'll work on enforcing the DTD instead. > > Andrew Beekhof wrote: > > >On 3/29/06, James Pan <[EMAIL PROTECTED]> wrote: > > > > > >>Need to clarify the role of the clone (or master-slave) resource. > >>Is it a resource container like resource group or an attribute of the > >>according primitive resource? > >> > >> > > > >the dtd clearly defines what a clone is. what you call it is up to you. > > > > > > > >>This question is derived from the comments of bug #1146. > >> > >>If it is a resource container, CIM needs an additional class for it, so > >>there will be _four_ classes > >>for resources (for primitive resource, resource group, master-slave, > >>resource clone, respectively. > >>And this is what i thought and what i've done in CIM). > >> > >>So if a user is going to create a clone resource, he can follow the > >>steps below: > >>(1) create an empty clone resource (by creating an instance of the clone > >>class). > >> > >> > > > >no. > > > >you can repeat this as many times as you like but the answer is still no. > > > >you can not have half a resource. even if it is disabled. > >once we have DTD validation any attempt to do so will be rejected by the CIB. > > > >let me be very clear... your approach to resource creation is flawed. > > > >gather the info you need and only then create the object(s) in the CIB. > > > >in one go. > > > >preferably including any constraints because it could potentially be > >started in the wrong place. > > > > > > > >>(2) create a primitve resource (by creating an instance of the primitive > >>class). > >>(3) add this primitive resource to the clone resource. > >>(4) submit the complete clone resource. > >> > >>And the according actions of these 3 steps will be: > >>(1) Caching the clone information on the disk instead of adding it to > >>the CIB. (because half resource is invalid). > >>(2) Caching the primitive resource information. > >>(3) making up a complete clone resource > >>(4) adding this complete clone resource into the CIB. > >> > >>In this case, It seems I need to introduce two states: enabled > >>resource and disabled resource. > >> > >> > > > >please read the DTD. there is even an annotated one. it defines what > >is legal and what is not, and also shows that the feature you're > >proposing has existed for a very long time. > > > >and because you apparently need it spelt out for you, the link that > >takes you straight to the allowed options for resources is: > > > > http://www.linux-ha.org/v2/dtd1.0/annotated#head-21617671c8195c0c54f09b529928900fb8cca005 > > > >i am now both sick of repeating myself and highly annoyed that you're > >clearly writing all this without paying any attention to our published > >interfaces. > > > > > > > >>An enabled resource is a resource in the CIB and is ready to run, and a > >>disabled resource is not in the > >>CIB and managed by the management tools. A new created resource should > >>be marked as disabled. > >> > >>There will be a method to enable a resource, two choices: > >>(1) Introduce a method for each resource class: Enable. An resource > >>won't be added to > >>the CIB until it is enabled. > >>or > >>(2) Introduce a class named ClustringService, which has a method: > >>AddResource. > >>This method will add a complete resource into the CIB. > >> > >>And those resource that haven't been added will be cached and managed > >>by the CIM providers. > >>In this way, although i can ensure the resource is complete before being > >>added to the CIB, > >>but i cann't avoid creating 'half resource' on the CIM layer. > >> > >> > >> > >>If it is an attribute, CIM does not need an additional class, there will > >>be only _two_ classes for > >>resources, one is for primitive resource and the other is for resource > >>group. the clone attributes > >>will be attributes of the primitive resource. In this case, I can > >>collect enough imformation for > >>creating a complete clone resource at one operation(that is, the > >>instance creation operation). > >>Then i can create a complete clone resource in the CIB directly. > >> > >>_______________________________________________________ > >>Linux-HA-Dev: [email protected] > >>http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > >>Home Page: http://linux-ha.org/ > >> > >> > >> > >_______________________________________________________ > >Linux-HA-Dev: [email protected] > >http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > >Home Page: http://linux-ha.org/ > > > > > > > > _______________________________________________________ > Linux-HA-Dev: [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > Home Page: http://linux-ha.org/ > _______________________________________________________ Linux-HA-Dev: [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
