[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcus Sorensen closed CLOUDSTACK-4618.
---------------------------------------


verified
                
> storage refactor has broken CLVM
> --------------------------------
>
>                 Key: CLOUDSTACK-4618
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4618
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Storage Controller
>    Affects Versions: 4.2.0
>            Reporter: Marcus Sorensen
>            Assignee: edison su
>            Priority: Blocker
>             Fix For: 4.2.0
>
>
>  I see the storage refactor has broken CLVM. It looks like the process is 
> doing something like:
> copy template from secondary to primary storage, then create copy of primary 
> storage template as new volume
> This breaks CLVM, because it used to just do:
> copy template from secondary to primary storage as new volume
> Since we can't efficiently clone in CLVM, it expects to always copy the 
> template from secondary storage, rather than copying to primary first and 
> then copying the whole template from the primary back to the same disks. 1) 
> because it thrashes the disks, and 2) copying the template is usually much 
> faster because the template is sparse, and the logical volume is not, so 
> copying a 10G template with a real size of 500M is much faster than copying a 
> 10G logical volume to another 10G logical volume.
> in KVMStorageProcessor.java cloneVolumeFromBaseTemplate:
>             if (primaryPool.getType() == StoragePoolType.CLVM) {
>                 vol = templateToPrimaryDownload(templatePath, primaryPool);
>             }
> This will never work, because templateToPrimaryDownload expects secondary 
> storage, and we have copied the template to primary storage and are passing 
> that. e.g.:
> {
>     "org.apache.cloudstack.storage.command.CopyCommand": {
>         "destTO": {
>             "org.apache.cloudstack.storage.to.VolumeObjectTO": {
>                 "accountId": 2,
>                 "dataStore": {
>                     "org.apache.cloudstack.storage.to.PrimaryDataStoreTO": {
>                         "host": "localhost",
>                         "id": 2,
>                         "path": "/vg0",
>                         "poolType": "CLVM",
>                         "port": 0,
>                         "uuid": "4e00fe65-c47e-4b85-afe8-4f97fb8689d0"
>                     }
>                 },
>                 "format": "QCOW2",
>                 "hypervisorType": "KVM",
>                 "id": 9,
>                 "name": "ROOT-9",
>                 "size": 1073741824,
>                 "uuid": "d73f3a2b-9e63-4faf-a45b-d6fcf7633793",
>                 "vmName": "i-2-9-VM",
>                 "volumeId": 9,
>                 "volumeType": "ROOT"
>             }
>         },
>         "executeInSequence": true,
>         "srcTO": {
>             "org.apache.cloudstack.storage.to.TemplateObjectTO": {
>                 "accountId": 2,
>                 "checksum": "44cd0e6330a59f031460bc18a40c95a2",
>                 "displayText": "tiny",
>                 "format": "QCOW2",
>                 "hvm": true,
>                 "hypervisorType": "KVM",
>                 "id": 201,
>                 "imageDataStore": {
>                     "org.apache.cloudstack.storage.to.PrimaryDataStoreTO": {
>                         "host": "localhost",
>                         "id": 2,
>                         "path": "/vg0",
>                         "poolType": "CLVM",
>                         "port": 0,
>                         "uuid": "4e00fe65-c47e-4b85-afe8-4f97fb8689d0"
>                     }
>                 },
>                 "name": "201-2-a04f958e-0aed-3642-960f-a675a2ee1c44",
>                 "origUrl": 
> "http://mirrors.betterservers.com/template/tiny-centos-63.qcow2";,
>                 "path": "c8da0364-6f94-4c71-9c1d-74078e55bbb8",
>                 "uuid": "7dcdb1fb-e7e3-4de0-bf93-13d3e6c4ade5"
>             }
>         },
>         "wait": 0
>     }
> }
> Also, format should be 'RAW', I believe, not 'QCOW2'.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to