cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yoshikazu Nojima" <m...@ynojima.net>
Subject Re: Review Request 19446: CLOUDSTACK-6191: Volume provisioning type option
Date Fri, 28 Mar 2014 05:10:20 GMT


> On March 27, 2014, 11:41 p.m., Marcus Sorensen wrote:
> > I'm also seeing some strange behavior on normal qcow2 (local) storage. When it is
installing the template to primary storage, in the past it has detected we are going from
qcow2 to qcow2 and simply copies the image rather than going the costly route of 'qemu-img
convert'. It still does that, but prior to the cp it is creating a new qcow2, then copying
over it with the template. So if I had to guess, the LVM might actually work if it didn't
try to qemu-img create before doing the regular template copy that is appropriate for the
storage type. I think we can skip the "qemu-img create" in this template install code path.
> > 
> > 2014-03-27 17:37:35,949 DEBUG [kvm.storage.KVMStorageProcessor] (agentRequest-Handler-3:null)
Copying template to primary storage, template format is qcow2
> > 2014-03-27 17:37:35,969 DEBUG [kvm.storage.LibvirtStorageAdaptor] (agentRequest-Handler-3:null)
copyPhysicalDisk: disk size:194240512, virtualsize:1073741824 format:qcow2
> > 2014-03-27 17:37:35,969 DEBUG [utils.script.Script] (agentRequest-Handler-3:null)
Executing: qemu-img create -o preallocation=off, -f qcow2 /var/lib/libvirt/images/11b71cf8-382f-4b38-a2b0-45e148a010e7
1073741824
> > 2014-03-27 17:37:36,019 DEBUG [utils.script.Script] (agentRequest-Handler-3:null)
Execution is successful.
> > 2014-03-27 17:37:36,019 DEBUG [utils.script.Script] (agentRequest-Handler-3:null)
Formatting '/var/lib/libvirt/images/11b71cf8-382f-4b38-a2b0-45e148a010e7', fmt=qcow2 size=1073741824
encryption=off cluster_size=65536 preallocation='off'
> > 
> > 2014-03-27 17:37:36,020 DEBUG [utils.script.Script] (agentRequest-Handler-3:null)
Executing: qemu-img info --output json /var/lib/libvirt/images/11b71cf8-382f-4b38-a2b0-45e148a010e7
> > 2014-03-27 17:37:36,031 DEBUG [utils.script.Script] (agentRequest-Handler-3:null)
Execution is successful.
> > 2014-03-27 17:37:36,032 DEBUG [utils.script.Script] (agentRequest-Handler-3:null)
Executing: qemu-img info --output json /mnt/939559aa-1bac-310a-a2ce-205336bdb136/2d7d88a8-6233-3ce1-9292-bc805d2e92e5.qcow2
> > 2014-03-27 17:37:36,040 DEBUG [utils.script.Script] (agentRequest-Handler-3:null)
Execution is successful.
> > 2014-03-27 17:37:36,041 DEBUG [utils.script.Script] (agentRequest-Handler-3:null)
Executing: /bin/bash -c cp -f /mnt/939559aa-1bac-310a-a2ce-205336bdb136/2d7d88a8-6233-3ce1-9292-bc805d2e92e5.qcow2
/var/lib/libvirt/images/11b71cf8-382f-4b38-a2b0-45e148a010e7

I think qcow2 image is created prior to the cp even without this patch, but without this patch,
createPhysicalDisk calls libvirt and it doesn't output output the creation to a log.
I'm not sure why current implementation create a volume and override it, but it it is not
necessary, I will erase it.


- Yoshikazu


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/19446/#review38845
-----------------------------------------------------------


On March 26, 2014, 11:24 p.m., Yoshikazu Nojima wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19446/
> -----------------------------------------------------------
> 
> (Updated March 26, 2014, 11:24 p.m.)
> 
> 
> Review request for cloudstack, Mike Tutkowski, Marcus Sorensen, and Wido den Hollander.
> 
> 
> Bugs: CLOUDSTACK-6191
>     https://issues.apache.org/jira/browse/CLOUDSTACK-6191
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> purpose:
> Thin provisioning of a volume saves consumption of a storage, and fat provisioning minimizes
IOPS performance overhead.
> This feature adds a disk offering parameter to provide users an option to select how
to provision volumes.
> Especially, qcow2 format is known that its performance can be improved by deploying a
volume as a sparse file.[1] This feature also supports sparse provisioning.
> 
>     http://itscblog.tamu.edu/improve-disk-io-performance-in-kvm/#.232---preallocation
> 
> Scope:
> First, start with KVM+NFS installation.
> Leave rooms to support other hypervisors.
> 
> For more details please refer fs: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Volume+provisioning+type+option
> 
> 
> Diffs
> -----
> 
>   api/src/com/cloud/offering/DiskOffering.java 4641b9a 
>   api/src/com/cloud/storage/Storage.java 8ab2463 
>   api/src/com/cloud/storage/Volume.java 304dbcf 
>   api/src/com/cloud/vm/DiskProfile.java 5fdacf2 
>   api/src/org/apache/cloudstack/api/ApiConstants.java 87fa8ee 
>   api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
67c9792 
>   api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java
6cd5d84 
>   api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java 91bd441 
>   api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java 764ade5 
>   api/src/org/apache/cloudstack/api/response/VolumeResponse.java 27e95de 
>   client/WEB-INF/classes/resources/messages.properties 8abe874 
>   core/src/org/apache/cloudstack/storage/to/VolumeObjectTO.java 11a3324 
>   engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
4ebde04 
>   engine/orchestration/test/com/cloud/vm/VirtualMachineManagerImplTest.java 49b2fc5 
>   engine/schema/src/com/cloud/service/ServiceOfferingVO.java 3be0aaa 
>   engine/schema/src/com/cloud/storage/DiskOfferingVO.java 99214b2 
>   engine/schema/src/com/cloud/storage/VolumeVO.java 9f27c23 
>   engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java 385f8e6

>   plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
1d7d1b2 
>   plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java
35777cf 
>   plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/IscsiAdmStorageAdaptor.java
761bb37 
>   plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/IscsiAdmStoragePool.java
2cecfa3 
>   plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePool.java ca3d32f

>   plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java
583d48a 
>   plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java
9813389 
>   plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java
c1a5043 
>   plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStoragePool.java
550bd01 
>   plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/StorageAdaptor.java c751aab

>   plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/qemu/QemuImg.java 4bec375 
>   plugins/hypervisors/kvm/test/org/apache/cloudstack/utils/qemu/QemuImgTest.java 8bdff4d

>   plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java
2a7bcac 
>   plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java
aa763d5 
>   plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMManagerTest.java
f418586 
>   plugins/network-elements/internal-loadbalancer/test/org/apache/cloudstack/internallbvmmgr/InternalLBVMServiceTest.java
62ca09b 
>   server/src/com/cloud/api/query/dao/DiskOfferingJoinDaoImpl.java bf28c03 
>   server/src/com/cloud/api/query/dao/ServiceOfferingJoinDaoImpl.java 7fcc5c6 
>   server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java 8a0431b 
>   server/src/com/cloud/api/query/vo/DiskOfferingJoinVO.java e3e0a9e 
>   server/src/com/cloud/api/query/vo/ServiceOfferingJoinVO.java dbeb530 
>   server/src/com/cloud/api/query/vo/VolumeJoinVO.java 8165d68 
>   server/src/com/cloud/configuration/ConfigurationManagerImpl.java bdceed7 
>   server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java 0512096 
>   server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java c692491

>   server/src/com/cloud/server/ConfigurationServerImpl.java 13135b0 
>   server/src/com/cloud/storage/VolumeApiServiceImpl.java 5ffa99b 
>   server/src/com/cloud/test/DatabaseConfig.java 8d7b42a 
>   server/test/com/cloud/vm/DeploymentPlanningManagerImplTest.java fb63766 
>   server/test/com/cloud/vm/UserVmManagerTest.java b67c164 
>   server/test/org/apache/cloudstack/service/ServiceOfferingVOTest.java a3f8afb 
>   services/secondary-storage/controller/src/org/apache/cloudstack/secondarystorage/SecondaryStorageManagerImpl.java
f8edefa 
>   setup/db/db/schema-440to450.sql 2bd5386 
>   test/integration/smoke/test_deploy_vm_provisioningtype_sparse.py PRE-CREATION 
>   test/integration/smoke/test_disk_offerings.py 4c8a34c 
>   test/integration/smoke/test_volumes.py 411ecf1 
>   ui/dictionary.jsp ebe71b6 
>   ui/scripts/configuration.js 7b2f4e9 
>   ui/scripts/docs.js 32237f3 
>   ui/scripts/storage.js e69a07e 
> 
> Diff: https://reviews.apache.org/r/19446/diff/
> 
> 
> Testing
> -------
> 
> Compute offering creation
> - create a compute offering with "provisioningtype="thin"
> - create a compute offering with "provisioningtype="sparse"
> - create a compute offering with "provisioningtype="fat"
> Disk offering creation
> - create a disk offering with "provisioningtype=thin"
> - create a disk offering with "provisioningtype=sparse"
> - create a disk offering with "provisioningtype=fat"
> New VM deployment
> - deploy a VM with a "thin" type compute offering, and check the root volume is provisioned
as s thin disk
> - deploy a VM with a "sparse" type compute offering, and check the root volume is provisioned
as s sparse disk
> - deploy a VM with a "fat" type compute offering, and check the root volume is provisioned
as s fat disk
> New data disk creation and attachment
> - create and attach "thin" type volume to a VM, and check the data volume is provisioned
as s thin disk
> - create and attach "sparse" type volume to a VM, and check the data volume is provisioned
as s sparse disk
> - create and attach "fat" type volume to a VM, and check the data volume is provisioned
as s fat disk
> 
> 
> Thanks,
> 
> Yoshikazu Nojima
> 
>


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