[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-6928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15146660#comment-15146660
 ] 

ASF GitHub Bot commented on CLOUDSTACK-6928:
--------------------------------------------

Github user alexandrelimassantana commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1410#discussion_r52846110
  
    --- Diff: 
engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java
 ---
    @@ -207,10 +211,14 @@ public VolumeInfo moveVolume(VolumeInfo volume, long 
destPoolDcId, Long destPool
     
             // Find a destination storage pool with the specified criteria
             DiskOffering diskOffering = 
_entityMgr.findById(DiskOffering.class, volume.getDiskOfferingId());
    -        ;
             DiskProfile dskCh = new DiskProfile(volume.getId(), 
volume.getVolumeType(), volume.getName(), diskOffering.getId(), 
diskOffering.getDiskSize(),
                     diskOffering.getTagsArray(), 
diskOffering.getUseLocalStorage(), diskOffering.isRecreatable(), null);
             dskCh.setHyperType(dataDiskHyperType);
    +        dskCh.setBytesReadRate(storageMgr.getDiskBytesReadRate(null, 
diskOffering));
    --- End diff --
    
    Hello @ustcweizhou,
    
    I see you have added into multiple methods the lines 217-220, where the 
only slight change is the first parameter being null or an ServiceOffering 
instance. I think that in order to avoid repeating the same code, you could 
extract those lines into the DiskProfile class. That way you can document and 
test the method and enhance reusability.


> IOPS throttling setting isn't applied to a dinamically attached volume
> ----------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-6928
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6928
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: KVM
>    Affects Versions: Future, 4.4.0
>         Environment: CloudStack 4.4-forward w/ KVM deployment
> Ubuntu Server 14.04
>            Reporter: Yoshikazu Nojima
>            Assignee: Wei Zhou
>            Priority: Critical
>              Labels: KVM
>
> IOPS throttling setting is NOT applied to a volume attached while VM is 
> running.
> I confirmed the setting is applied to a volume attached while VM is stopped.
> attach volume agent log:
> 2014-06-17 19:07:22,356 DEBUG [cloud.agent.Agent] 
> (agentRequest-Handler-3:null) Processing command: 
> org.apache.cloudstack.storage.command.AttachCommand
> 2014-06-17 19:07:22,401 DEBUG [kvm.storage.KVMStorageProcessor] 
> (agentRequest-Handler-3:null) Attaching device: <disk  device='disk' 
> type='file'>
> <driver name='qemu' type='qcow2' cache='none' />
> <source 
> file='/mnt/ec7a4ea0-a11f-3ab6-89f5-6c2702e3fcf8/e01df6a7-f832-4616-a151-8ad8bcd4cf64'/>
> <target dev='vdd' bus='virtio'/>
> </disk>
> start instance agent log:
> 2014-06-17 19:10:47,984 DEBUG [kvm.resource.LibvirtComputingResource] 
> (agentRequest-Handler-1:null) starting i-2-3-VM: <domain type='kvm'>
> <name>i-2-3-VM</name>
> <uuid>8fad689b-d63d-4802-81d9-d11acf91b879</uuid>
> <description>CentOS 5.5 (64-bit)</description>
> <clock offset='utc'>
> </clock>
> <features>
> <pae/>
> <apic/>
> <acpi/>
> </features>
> <devices>
> <emulator>/usr/bin/kvm-spice</emulator>
> <interface type='bridge'>
> <source bridge='breth0-2453'/>
> <mac address='02:00:19:5e:00:01'/>
> <model type='virtio'/>
> <bandwidth>
> <inbound average='25600' peak='25600'/>
> <outbound average='25600' peak='25600'/>
> </bandwidth>
> </interface>
> <serial type='pty'>
> <target port='0'/>
> </serial>
> <graphics type='vnc' autoport='yes' listen='10.1.2.24' 
> passwd='987a62e28e4358d8'/>
> <disk  device='disk' type='file'>
> <driver name='qemu' type='qcow2' cache='none' />
> <source 
> file='/mnt/e70b1e09-b7e8-3f14-8779-cfb75b651119/b1967fe4-6100-4777-8804-26a349ef06ea'/>
> <target dev='vda' bus='virtio'/>
> </disk>
> <disk  device='disk' type='file'>
> <driver name='qemu' type='qcow2' cache='none' />
> <source 
> file='/mnt/ec7a4ea0-a11f-3ab6-89f5-6c2702e3fcf8/92920d85-1190-43ce-af03-5d2f6a6e1004'/>
> <target dev='vdb' bus='virtio'/>
> <iotune>
> <read_iops_sec>200</read_iops_sec>
> <write_iops_sec>200</write_iops_sec>
> </iotune>
> </disk>
> <disk  device='disk' type='file'>
> <driver name='qemu' type='qcow2' cache='none' />
> <source 
> file='/mnt/ec7a4ea0-a11f-3ab6-89f5-6c2702e3fcf8/e01df6a7-f832-4616-a151-8ad8bcd4cf64'/>
> <target dev='vdd' bus='virtio'/>
> <iotune>
> <read_iops_sec>200</read_iops_sec>
> <write_iops_sec>200</write_iops_sec>
> </iotune>
> </disk>
> <disk  device='cdrom' type='file'>
> <driver name='qemu' type='raw' cache='none' />
> <source file=''/>
> <target dev='hdc' bus='ide'/>
> </disk>
> <console type='pty'>
> <target port='0'/>
> </console>
> <input type='tablet' bus='usb'/>
> </devices>
> <memory>1048576</memory>
> <devices>
> <memballoon model='none'/>
> </devices>
> <vcpu>1</vcpu>
> <os>
> <type  arch='x86_64' machine='pc'>hvm</type>
> <boot dev='cdrom'/>
> <boot dev='hd'/>
> </os>
> <cputune>
> <shares>1000</shares>
> </cputune>
> <cpu></cpu><on_reboot>restart</on_reboot>
> <on_poweroff>destroy</on_poweroff>
> <on_crash>destroy</on_crash>
> </domain>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to