[libvirt] [PATCH] qemuDomainDiskChangeSupported: Forbid alias change

John Ferlan jferlan at redhat.com
Fri Jan 5 11:34:08 UTC 2018



On 01/05/2018 03:20 AM, Michal Privoznik wrote:
> On 01/05/2018 01:15 AM, John Ferlan wrote:
>>
>>
>> On 12/13/2017 09:30 AM, Michal Privoznik wrote:
>>> Since we have user aliases it may happen that users want to
>>> change it using 'update-device'. Instead of ignoring it silently,
>>> error out loudly.
>>>
>>> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>>> ---
>>>  src/qemu/qemu_domain.c | 8 ++++++++
>>>  1 file changed, 8 insertions(+)
>>>
>>
>> So IIUC this would be adding a check that the libvirt supplied alias
>> matches, true? But your goal is to check if a "ua-" prefixed alias was
>> being used - so should the check use of the prefix?
> 
> I don't think this is limited to user provided aliases only. For
> instance, libvirt generates the following aliases for disks: scsi0-0-0,
> ide0-1-0, fdc0-0-0.
> 
> Now, what should happen if an user provides new disk XML trying to
> change nothing but 'scsi0-0-0' to say 'scsi0-0-1' (for live domain)? I
> think it should be forbidden - we don't have way to change IDs in qemu,
> do we? We certainly lack implementation to support it.
> 
> Therefore, I think we don't have to limit the check just for 'ua-' prefixes.
> 

OK - fair enough...  Perhaps the commit message is what caught my
attention/focus to ua- in particular.  Maybe the extra explanation here
can be worked in.

Reviewed-by: John Ferlan <jferlan at redhat.com>

John

>>
>> There's probably a few more info. fields that could be considered - any
>> thoughts on those? Perhaps fairly difficult to keep up with the various
>> _virDomainDiskDef and friends alterations for what this function is
>> indicating...
> 
> Yeah, probably. I'm not sure. Maybe we will find some more.
> 
> Michal
> 




More information about the libvir-list mailing list