cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mice Xia" <>
Subject Re: Review Request: CS-15609 Volumes can be created as a part of VM creation when un-allocated space is insufficient on primary storage
Date Wed, 25 Jul 2012 13:43:08 GMT

Hi Edison,

after some further investigation, i found it is non-trivial to put this logic in findSuitablePoolsForVolumes.

method findSuitablePoolsForVolumes is essentially used for listing all storage pools for one
individual volume.(it even gets a parameter 'returnUpTo'). if it has to deal with more then
one volumes, the computation there will be exponential, it is basically a tree recursive search
for all possible volume allocation on storagepools, think about following example.

volA 20G , volB 30G  
SP1 40G, sp2 60G 

there are three possible allocation:
volA->SP1 volB->SP2
volA->SP2 volB->SP2
volA->SP2 volB->SP1

this seems not very efficient and the return signature may need a change.

back to this multiple volumes capacity check issue, i would like to suggest following two
1) put special check logic in findSuitablePoolsForVolumes, but, instead of recursive exploring,
return immediately when the first possible allocation is found.
2) or keep it in findPotentialDeploymentResources, while findSuitablePoolsForVolumes is responsbile
for providing pools for single volume, findPotentialDeploymentResources will check them as
a whole and it will return immediately after find a proper allocation.

please adivce, thanks


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message