[Engine-devel] Floating Disks implementation in REST-API
Ori Liel
oliel at redhat.com
Tue Apr 17 14:53:07 UTC 2012
>On 04/17/2012 05:26 PM, Ori Liel wrote:
>>>
>>>>> Floating disks should be both in the root context, and also in the VM
>>>>> context for each VM the floating disk is attached to, right? So floating
>>>>> disks would appear 1+N_attach times in the API, once in the root
>>>>> context, and once for each VM they are attached to.
>>>>>
>>>>
>>>> IIUC a floating disk is not associated with the VM in any way, and should
>>>> not appear in that VM's collection of disks. There's a similar feature of
>>>> activate/deactivate disk (http://www.ovirt.org/wiki/Features/HotPlug).
>>>> A deactivated disk is still associated with the VM, and should appear in
>>>> the VM's collection of disks. Perhaps this is the source of confusion.
>>>
>>> No that isn't it. I think have a bit of terminology mismatch. According to:
>>>
>>> http://www.ovirt.org/wiki/Features/DetailedFloatingDisk
>>>
>>> i think your use of the word floating is correct. I got confused as i
>>> thought that any disk could be floating, whether it was attached to 0
>>> VMs, 1 VM, or 2 or more VMs.
>>>
>>> So before we go further, let's get things straight:
>>>
>>> - disk without any VMs => floating. It appears in the root context.
>>> - disk attached to 1 VM => normal state. It appears in the VM context.
>>
>> I think this type of disk should be shown in both contexts.
>>
>> If a user is looking at http://{hostort}/disks, I think he intuitively
>> expects to see all disks (attached or unattached). A disk will contain
>> reference to the VMs which it is attached to, and thus:
>>
>> - No VM-ids --> floating disk.
>> - One VM-id --> regular disk.
>> - Multiple VM-ids --> shared disk.
>
>iirc, shared disk is a flag on the disk to allow it to be shared.
>doesn't mean it is shared yet, rather can be shared.
Right, but there's no contradiction: a disk can have 'shared' flag and
also show the list of VMs it's attached to. The flag tells you if the
disk has the ability to be shared, while the list of VMs tells you which
VMs are actually sharing the disk right now (if any at all)
>
>>
>>> - disk attached to 2 VMs => shared disk. It appears in both VM contexts.
>>>
>>> Is that correct?
>>>
>>> Also can someone explain on how floating and shared disks are actually
>>> implemented in the BE? I imagine it's one of two ways:
>>>
>>> => The BE keep a global list of disks, each disk with zero or more
>>> references to a VM.
>>> => The BE keeps a special "floating" state independent of the number
>>> of VMs that it is attached to.
>>>
>>> Thanks,
>>> Geert
>> _______________________________________________
>> Engine-devel mailing list
>> Engine-devel at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/engine-devel
>
More information about the Engine-devel
mailing list