Introduction

Existing CloudStack supports volume provisioning from a backed volume snapshot only with sequential job execution. Everything works slick till the cloud provider admin user submits a multiple volume create request. Orchestration layer is unable to handle this kind of request when user fires simultaneous/concurrent volume create from a single snapshot.


For example, volumes with names V1, V2, V3 were submitted simultaneous create request from management server for the snapshot SS. Volume V1 gets created successfully without any interruption. CloudStack Orchestration layer follows state transition framework. Snapshot SS state has been changed to occupied while V1 request is being served. Due to this the other two volumes (V2, V3) creation request were getting failed.

Purpose

The feature is to support parallel creation of multiple data volumes from a volume snapshot on storage resource.

References

CLOUDSTACK-9895


Branch

Master

Document History

Author

Description

Date

Pavan Aravapalli
First revision27 April 2017

Glossary

Use case

Feature specification

Test guidelines

Error handling

 

Audit Events

Target users

  1. CloudStack Users and Admins.

Current behavior

The multiple volume create operation behavior varies with each hypervisor. The behavior with respect to each hypervisor below.

VMware:  

                 TODO : Yet to Update Details

XenServer:  Xen allows concurrent requests and the behavior  of the request handling is like mentioned below

KVM: KVM allows concurrent request 

          TODO : Yet to update other details

 

Design description

At present volume creation from snapshot is prohibited and restricted to one volume per snapshot at a time. Reason behind current behavior is because ObjectInDataStore state machine supports only one job at a time. As the hypervisors allow to take volume creation from snapshot  in parallel based on the host/end-point selected .This feature will allow the same ability and thus save time when creating multiple volumes of single snapshot subsequently. The possible solution(s):


  1.  Add source state 'Copying', destination state  as 'Copying' and Event as CopyingRequested

    2.  Add source state 'Copying', destination state  as        'Copying' and Event as CopyingRequested.

3.Truncate state transition for snapshot refer state. And do not change the state of derived snapshot entity (SNAPSHOT_STORE_REF table entity for snapshot).  Store concurrent request information in VOLUME_DETAILS table as described below

Note :  selected solution 3 as the best way to implement, because it's the optimal way of bringing the concurrent volume creation request.

 

 Known Things 

  1.  In case if Management Server gets restarted while serving concurrent requests, the expected behavior is same as for the Single Request Handling.  i.e MS server will not perform any volume/snapshot sync operation in case of MS restart. 
  2. Delete Snapshot / Create Template Operation(s) is permitted while a create volume operation in-progress. It should be addressed in next releases or in bug fixing.

 

TODO: Yet to Check and add if any other solutions.

Limitations / Assumptions

  1. In case of XenServer : selecting end point/host for executing copy cmd picks is based on random algorithm, If the end selection is differed for each concurrent request then copy cmd executed in concurrent manner, else it's sequential execution at resource layer.

Work Flow

API Changes

No changes

DB Changes

N/A

 

Hypervisors supported

XenServer,KVM,VMware

 

UI Changes

No changes

Upgrade

N/A

Open Items/Questions

N/A

References

N/A