mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Retrieval of an image store using ImageStoreProviderManager has been refactored by introducing three different methods, DataStore getRandomImageStore(List<DataStore> imageStores); To get an image store for reading purpose. Threshold capacity check will not be used here. DataStore getImageStoreWithFreeCapacity(List<DataStore> imageStores); To get an image store for reading purpose. Threshold capacity check will be used here and the store with max free space will be returned. If no store with filled storage less than the threshold is found, the NULL value will be returned. List<DataStore> listImageStoresWithFreeCapacity(List<DataStore> imageStores); To get a list of image stores for writing purpose which fulfills threshold capacity check. Correspondingly DataStoreManager methods have been refactored to return similar values for a given zone. Fixes #3287 - NULL value will be returned when secondary storage is needed for writing but there is not store with free space. Fixes #3041 - Rather than returning random secondary storage for writing, storage with max. free space will be returned. Fixes #3478 - For migration on VMware, all writable secondary storage will be mounted while preparation. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>