[Libvirt-cim] [PATCH 00/20] REWORK/PARIAL: Changes to solve unsupported tag issue

Boris Fiuczynski fiuczy at linux.vnet.ibm.com
Fri Dec 13 13:05:41 UTC 2013


On 12/03/2013 03:05 AM, Xu Wang wrote:
> Dear Boris and John,
>    Firstly thank you very much for your suggestion. Every comment from
> you make me gain my knowledge on libvirt-cim. But I think I should
> explain what the goal we want to reach.
>    The reason I got this mission is most of bugs reported recently is
> users lost some of tags during resource operation. Even more serious is
> the lost tag had nothing to do with the device they updated. For
> example, if one attribute in <disk> device changed, the "model"
> attribute in the <cpu> lost after updated! Isn't it a serious bug?
Actually this is not a bug but a behavior of libvirt-cim that it reduces 
a guest definition to the scope of its management domain. This is done 
so that the user can observe and set all the settings in the management 
domain of libvirt-cim and nothing is preventing him from storing this by 
libvirt-cim changed guest definition.
To make my point: How did the model attribute get into the cpu tag? Not 
via libvirt-cim! Why did someone use other means to do this modification 
and than uses libvirt-cim again? Why not implement this libvirt feature 
so that is available in libvirt-cim?
I think that the solution should be to implement the missing feature in 
libvirt-cim so that the model attribute and whatever else might be 
missing to support it can be observed and set with libvirt-cim.

> What
> should we do after a bug reported? One patch generated. And another bug,
> another patch...But our users may fall into reporting bugs like this,
> again and again.
Isn't that business as usual? If libvirt-cim does not support a libvirt 
feature is that a bug or a feature request? I would say it is a feature 
request.
But if one uses other means to set this libvirt feature in the guest 
definition and is using libvirt-cim again on this guest definition he 
should be made aware that libvirt-cim manages within its own management 
scope and settings will get lost that are outside of this management 
scope to maintain the manageability from within libvirt-cim.

>    After thought about the whole process carefully I think we may lost
> my original intention. That is just adding some struture to keep some
> unsupported tags without missing during updating even OTHER devices.
> Hence, with regard to the device updating issue we ever focused on, an
> option could be offered to the code may use it instead of user. Such as
> <lun> and <disk> Boris mentioned. That situation is impossible occur now
> because we haven't added this type into libvirt-cim so it belongs to
> UNKNOWN_TYPE now. That option or some other hack code could be added
> into this patch (maybe made in the future).
Actually all we need to look at is the use of the method 
ModifyResourceSettings on KVM_VirtualSystemManagementService. Correct?
Looking at how the new pattern behaves:
The modified RASD will delete the others structure of internal data 
representation (meaning all unknown tags and attributes of the 
corresponding guest xml instance are deleted).
You are correct that the example I gave is not a problem... with the way 
you handle modified instances by deleting all unknown elements and guest 
definitionerties.
A few questions are coming to my mind:
1) Is it acceptable that e.g. the unsupported per device boot setting is 
eliminated by an update of e.g. a disk resource? Is that the next bug 
someone will open?
2) What happens if two or more device instances have dependencies on 
each other by settings that libvirt-cim does not handle but libvirt does?
3) If someone by other means chose to use per device boot elements in 
the guest definition and now wants to modify this guest definition 
setting the boot order with libvirt-cim it will no longer work since the 
OS boot element and the per-device boot elements are mutually exclusive 
and libvirt is enforcing this! It would leave the user stuck using 
libvirt-cim.


>    So my design is just designed a set of basic operations and use them
> intead of changed the old pattern. All xml reading and generating logic
> just like before.
>
>    As we discuss more the design becomes more complex. So I think I
> should describe my new version design now,
>    1. Boris's data structure is so good that it looks very tiny and
> suitable. That's a good choice to keep data structure and unsupported
> tags now.
>    2. Basic operations based on macros is a good choice.
>    3. We shouldn't extend the function of data structure but just mark
> it with status UNMANAGED, MANAGED and DELETED (UPDATED is not necessary
> because all data just could be updated in the virt_device members now).
>    3. As to resource updating, we just could change the variables in the
> libvirt-cim API so some resource updating issue would not occur.
>    4. I am glad to be responsible for all works about it.
>
>    At last, I sincerely hope get any suggestion from you to solve that
> issue (my customers and boss almost take me to shreds because that),
> even an absolutely new one :-)
>
> Thanks,
>    Xu Wang
>
>
> 于 2013/12/2 16:28, Boris Fiuczynski 写道:
>> John and Xu,
>> in the last view days I have done some thinking about the idea from Xu
>> to work with the unknown tags and guest definitionerties.
>>
>> Starting off by looking at how one would get into the situation of
>> losing additional tags and guest definitionerties I ended up with actually only
>> one feasible explanation: A libvirt-cim user wants to use a libvirt
>> feature not implemented in libvirt-cim.
>>
>> With that in mind I revisited the new guest definitionosed pattern again:
>> Before I was thinking that the errors caused by new (unknown) tags and
>> guest definitionerties are just kind of the reversal of losing the new (unknown)
>> tags and guest definitionerties.
>> I now come to another conclusion: Now I think that the errors are far
>> worse than I thought, because as long as libvirt-cim is reducing
>> everything to the known management scope the libvirt-cim user has it
>> in his control to create and manage a new error free and working
>> libvirt domain.
>> With the new guest definitionosed pattern that is no longer true since if errors
>> are caused by new (unknown) tags and guest definitionerties that are outside of
>> the known management scope of libvirt-cim the users have NO LONGER the
>> capability to fix these problems from within libvirt-cim!
>> What would be the result? I would guess that bugs would be opened
>> against libvirt-cim reporting that it creates erroneous libvirt domain
>> definitions.
>> I would really not like to see libvirt-cim fixes in support for
>> unsupported libvirt features which are caused by the new pattern of
>> how unknown tag and guest definitionerties are maintained.
>> If currently bugs are opened that libvirt-cim is following the pattern
>> of reducing a domain definition to its known management scope the
>> answer is very easy: The used libvirt feature that is removed from the
>> domain definition is not supported by libvirt-cim and libvirt-cim only
>> maintains what it is supporting in the domain definition.
>> The question should actually be how the missing libvirt feature can be
>> implemented in libvirt-cim. This unsurprisingly correlates exactly
>> with the second paragraph above ("A libvirt-cim user wants to...").
>>
>> In summary: I no longer agree to the idea of replacing the old pattern
>> with the new guest definitionosed pattern of how to handle unknown tags and
>> guest definitionerties.
>>
>> Sorry that it took me a while to realize that. I hope that my above
>> explanations can be followed of why I changed my mind.
>>
>>
>> On 11/26/2013 01:31 PM, Xu Wang wrote:
>>>
>>> 于 2013/11/23 0:18, Boris Fiuczynski 写道:
>>>> On 11/21/2013 04:15 AM, Xu Wang wrote:
>>>>>
>>>>> 于 2013/11/21 5:10, John Ferlan 写道:
>>>>>> On 11/20/2013 08:27 AM, Boris Fiuczynski wrote:
>>>>>>> John and Xu,
>>>>>>>
>>>>>>> On 11/19/2013 10:49 PM, John Ferlan wrote:
>>>>>>>> On 11/18/2013 09:59 AM, Boris Fiuczynski wrote:
>>>>>>>>> John and Xu Wang,
>>>>>>>>> here are a few general observations from side:
>>>>>>>> First off - I tend to find myself agreeing with Boris here. I
>>>>>>>> think the
>>>>>>>> concept is important and necessary; however, I'm not convinced the
>>>>>>>> implementation goes far enough.
>>>>>>>>
>>>>>>>>> 1) I agree that it makes sense to preserve the unknown xml
>>>>>>>>> "entities"
>>>>>>>>> even so it can create complex scenarios and even new kinds of
>>>>>>>>> errors if
>>>>>>>>> unknown entities depend on known entities which get modified
>>>>>>>>> making
>>>>>>>>> them
>>>>>>>>> unusable for the unknown entities. This error would probably be
>>>>>>>>> the
>>>>>>>>> reversal of what is currently the problem when unknown entities
>>>>>>>>> simply
>>>>>>>>> disappear.
>>>>>>>> Is there a more concrete example of "new kinds of errors if unknown
>>>>>>>> entities depend on known entities which get modified making them
>>>>>>>> unusable for the unknown entities" that can be given? Just for
>>>>>>>> clarity.
>>>>>>>> I've read that line a few times and I'm still not sure :-)
>>>>>>> OK, let's take a look at device type disk.
>>>>>>> Since 1.0.2 the guest definitionerty sgio was added. Let's assume this is the
>>>>>>> unknown entity. sgio is only valid for guest definitionerty device "lun".
>>>>>>> If one now changes the guest definitionerty device to "disk" than the unknown
>>>>>>> entity
>>>>>>> sgio would cause an error when specified.
>>>>>>>
>>>>>> Ah - I see.  Not only do you have to manage the guest definitionerties you
>>>>>> have to
>>>>>> know how to use them as well and all their rules. I forgot about
>>>>>> that. I
>>>>>> came from HP/HPVM and yes, this brings back all sorts of memories...
>>>>>>
>>>>>> Seems like in this case, when/if the guest definitionerty was changed from
>>>>>> "lun" to
>>>>>> "disk" - code would have to search that 'others' list for the "sgio"
>>>>>> guest definitionerty and know how to handle adjusting it.  That'll get tricky...
>>>> You cannot search in others for something you do not know about...
>>>> unless you can code magic! :-)
>>> If needed that's possible. We just coding just like...xpath. Before that
>>> we should make sure if it's necessary.
>>
>>
>


-- 
Mit freundlichen Grüßen/Kind regards
    Boris Fiuczynski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martina Köderitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294




More information about the Libvirt-cim mailing list