cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Decision making logic of which Secondary storage to be used

Open dhlaluku opened this issue 8 years ago • 12 comments

Related to this unresolved issue https://issues.apache.org/jira/browse/CLOUDSTACK-2919 Add proper check for disk space on secondary storage to be used for volume migration across clusters. The current logic does not validate if volume will fit in the destination storage pool, but only checks if whether secondary storage disk utilization has not reached 90%.

ISSUE TYPE
  • Improvement Request
  • Enhancement Request
COMPONENT NAME
Storage
CLOUDSTACK VERSION
4.9+
CONFIGURATION

2+ Secondary Storage (ImageStore) pools with Zone scope 2+ Clusters

OS / ENVIRONMENT

N/A

SUMMARY

When performing cross-cluster volume migration in multi ImageStore environments within the same Zone. The volume is first copied the secondary storage, attached to a worker VM and then migrated to the destination storage pool. This is procedure is only successful when the following 2 conditions are satisfied

  1. The ImageStore disk usage should not exceed a hardcoded value of 0.9 (90 %)
  2. The size of the volume the volume to be migrated should exist the amount of free space available in the ImageStore. image
STEPS TO REPRODUCE
- Fill up secondary storage disk up to 90%
- Perform cross-cluster volume migration through UI or API
EXPECTED RESULTS
An exception should be thrown explaining that no suitable secondary storage pool was found for volume migration.
ACTUAL RESULTS
CloudStack selects a random secondary storage pool and attempts to migrate the volume anyways and fails when the size of the volume exceeds the amount of free space within that particular secondary storage.

dhlaluku avatar Nov 21 '18 13:11 dhlaluku

Throw 'InsufficientCapacityException' when migration fails due to insufficient space in secondary storage

dhlaluku avatar Nov 21 '18 20:11 dhlaluku

Any chance on getting this into 4.12.0? Otherwise, I would move it to 5.0.0

rafaelweingartner avatar Jan 15 '19 19:01 rafaelweingartner

@dhlaluku any update on this one?

GabrielBrascher avatar Jan 24 '19 22:01 GabrielBrascher

@GabrielBrascher @rafaelweingartner I will pick this up some time next week.

dhlaluku avatar Jan 25 '19 13:01 dhlaluku

@dhlaluku this one?

kioie avatar Feb 14 '19 12:02 kioie

@kioie yes

dhlaluku avatar Feb 14 '19 12:02 dhlaluku

Ping @anuragaw

yadvr avatar Jun 27 '19 07:06 yadvr

Refer for duplicate and related case of uploading template/iso/volume: https://github.com/apache/cloudstack/issues/3287 where secondary storage usage exceeds the threshold

yadvr avatar Jul 08 '19 10:07 yadvr

what's the next steps on this issue @rhtyd ? Should I investigate and create a fresh PR as needed?

anuragaw avatar Jul 08 '19 11:07 anuragaw

The selection of secondary storage should be refactored (the method) based on usage and throw exception when no available image store is found with enough capacity. @shwstppr can you continue over this, there is an existing PR you can review or extend over.

yadvr avatar Jul 08 '19 11:07 yadvr

Related: https://github.com/apache/cloudstack/issues/3041 https://github.com/apache/cloudstack/issues/3287 https://github.com/apache/cloudstack/issues/3478

yadvr avatar Jul 10 '19 07:07 yadvr

Related/dupes https://github.com/apache/cloudstack/issues/3478 closing this one.

yadvr avatar Jul 25 '19 07:07 yadvr