You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/02/18 10:36:41 UTC

[GitHub] [cloudstack] Pearl1594 opened a new pull request #6005: [WIP] Support to resize volume during attach

Pearl1594 opened a new pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005


   ### Description
   
   This PR addresses #5906  
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ********************************************************************************* -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ********************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [X] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [X] Minor
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   Uploaded a volume with custom disk offering, 
   Attach the volume to a VM, it performs a resize operation on attach.
   
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1064179558


   <b>Trillian test result (tid-3551)</b>
   Environment: xcpng82 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 44756 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6005-t3551-xcpng82.zip
   Smoke tests completed. 91 look OK, 1 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_12_resize_volume_with_only_size_parameter | `Error` | 1.06 | test_volumes.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1065083131


   @Pearl1594 I understand these words: "help", "hello", "thanks", "package", "test"
   Test command usage: test [mgmt os] [hypervisor] [keepEnv]
   Mgmt OS options: ['suse15', 'centos7', 'centos6', 'alma8', 'ubuntu18', 'ubuntu20', 'rocky8']
   Hypervisor options: ['kvm-centos6', 'kvm-centos7', 'kvm-rocky8', 'kvm-alma8', 'kvm-ubuntu18', 'kvm-ubuntu20', 'kvm-suse15', 'vmware-55u3', 'vmware-60u2', 'vmware-65u2', 'vmware-67u3', 'vmware-70u1', 'vmware-70u2', 'vmware-70u3', 'xenserver-65sp1', 'xenserver-71', 'xenserver-74', 'xcpng74', 'xcpng76', 'xcpng80', 'xcpng81', 'xcpng82']
   	Note: when keepEnv is passed, you need to specify mgmt server os and hypervisor or use the `matrix` command.
   Package command usage: package [all(default value),kvm,xen,vmware,hyperv,ovm] - a comma separated list can be passed with package command to bundle the required hypervisor's systemVM templates. Not passing any argument will bundle all - kvm,xen and vmware templates.
   
   Blessed contributors for kicking Trillian test jobs: ['rohityadavcloud', 'nvazquez', 'borisstoyanov', 'DaanHoogland', 'shwstppr', 'andrijapanicsb', 'Pearl1594', 'davidjumani', 'harikrishna-patnala', 'vladimirpetrov', 'sureshanaparti', 'weizhouapache', 'NuxRo']


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Pearl1594 commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1061678759


   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1065103108


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2848


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Pearl1594 commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1065082654


   @blueorangutan help
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1073455931


   @blueorangutan test centos7 xcpng82


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1065004874


   @Pearl1594 a Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1061707118


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2794


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on a change in pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
nvazquez commented on a change in pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#discussion_r830739251



##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -364,7 +383,31 @@ public VolumeVO uploadVolume(UploadVolumeCmd cmd) throws ResourceAllocationExcep
         RegisterVolumePayload payload = new RegisterVolumePayload(cmd.getUrl(), cmd.getChecksum(), cmd.getFormat());
         vol.addPayload(payload);
 
-        volService.registerVolume(vol, store);
+        return registerVolume(vol, store, sizeInGB);
+    }
+
+    VolumeVO registerVolume(VolumeInfo vol, DataStore store, Long sizeInGB ) {
+        VolumeVO volume = _volsDao.findById(vol.getId());
+        try {
+            AsyncCallFuture<VolumeApiResult> future = volService.registerVolume(vol, store);
+            VolumeApiResult result = future.get();
+            if (result.isFailed()) {
+                s_logger.warn("Failed to register the volume");
+                String details = "";
+                if (result.getResult() != null && !result.getResult().isEmpty()) {
+                    details = result.getResult();
+                }
+                throw new CloudRuntimeException(details);
+            }
+            if (!Objects.equals(sizeInGB, vol.getSize())) {

Review comment:
       Can we add a null check for `sizeInGB` here as well?

##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -364,7 +383,31 @@ public VolumeVO uploadVolume(UploadVolumeCmd cmd) throws ResourceAllocationExcep
         RegisterVolumePayload payload = new RegisterVolumePayload(cmd.getUrl(), cmd.getChecksum(), cmd.getFormat());
         vol.addPayload(payload);
 
-        volService.registerVolume(vol, store);
+        return registerVolume(vol, store, sizeInGB);
+    }
+
+    VolumeVO registerVolume(VolumeInfo vol, DataStore store, Long sizeInGB ) {
+        VolumeVO volume = _volsDao.findById(vol.getId());
+        try {
+            AsyncCallFuture<VolumeApiResult> future = volService.registerVolume(vol, store);
+            VolumeApiResult result = future.get();
+            if (result.isFailed()) {
+                s_logger.warn("Failed to register the volume");
+                String details = "";
+                if (result.getResult() != null && !result.getResult().isEmpty()) {
+                    details = result.getResult();
+                }
+                throw new CloudRuntimeException(details);
+            }
+            if (!Objects.equals(sizeInGB, vol.getSize())) {
+                if (sizeInGB !=null) {
+                    volume.setSize(sizeInGB * GiB_TO_BYTES);

Review comment:
       At this point is there any other reference that needs to be updated, like volume_store_ref? Could this cause any issues with GetVolumeStats or not considered at this volume state?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Pearl1594 commented on a change in pull request #6005: [WIP] Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on a change in pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#discussion_r809897698



##########
File path: engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
##########
@@ -92,7 +92,7 @@ public VolumeInfo getVolume() {
 
     AsyncCallFuture<VolumeApiResult> resize(VolumeInfo volume);
 
-    void resizeVolumeOnHypervisor(long volumeId, long newSize, long destHostId, String instanceName);
+    void resizeVolumeOnHypervisor(long volumeId, long currentSize, long newSize, long destHostId, String instanceName);

Review comment:
       Yes it should suffice as currentsize can be got from volume. But in case of an uploaded volume with a custom disk offering specified, we set the new size (i.e., the size that it would get resized to eventually during attach) as the volume size, instead of the physical size. And since I am reusing this method to resize the volume after the attach operation, vol.size() = currentSize would be equal to newSize. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #6005: [WIP] Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#discussion_r809885469



##########
File path: engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
##########
@@ -92,7 +92,7 @@ public VolumeInfo getVolume() {
 
     AsyncCallFuture<VolumeApiResult> resize(VolumeInfo volume);
 
-    void resizeVolumeOnHypervisor(long volumeId, long newSize, long destHostId, String instanceName);
+    void resizeVolumeOnHypervisor(long volumeId, long currentSize, long newSize, long destHostId, String instanceName);

Review comment:
       why is the parameter be called `currentSize` needed? seems like `newSize` is enough.

##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -364,7 +379,27 @@ public VolumeVO uploadVolume(UploadVolumeCmd cmd) throws ResourceAllocationExcep
         RegisterVolumePayload payload = new RegisterVolumePayload(cmd.getUrl(), cmd.getChecksum(), cmd.getFormat());
         vol.addPayload(payload);
 
-        volService.registerVolume(vol, store);
+        try {
+            AsyncCallFuture<VolumeApiResult> future = volService.registerVolume(vol, store);
+            VolumeApiResult result = future.get();
+            if (result.isFailed()) {
+                s_logger.warn("Failed to resize the volume " + volume);
+                String details = "";
+                if (result.getResult() != null && !result.getResult().isEmpty()) {
+                    details = result.getResult();
+                }
+                throw new CloudRuntimeException(details);
+            }
+            volume = _volsDao.findById(vol.getId());
+            if (!Objects.equals(sizeInGB, vol.getSize())) {
+                if (sizeInGB !=null) {
+                    volume.setSize(sizeInGB * GiB_TO_BYTES);
+                    _volsDao.persist(volume);
+                }
+            }
+        } catch (Exception e) {
+            throw new CloudRuntimeException(String.format("Failed to register volume due to - %s", e.getMessage()), e);
+        }

Review comment:
       can you extract?

##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -353,9 +354,23 @@ public VolumeVO uploadVolume(UploadVolumeCmd cmd) throws ResourceAllocationExcep
         String format = cmd.getFormat();
         Long diskOfferingId = cmd.getDiskOfferingId();
         String imageStoreUuid = cmd.getImageStoreUuid();
+        Long sizeInGB = cmd.getSize();
+
         DataStore store = _tmpltMgr.getImageStore(imageStoreUuid, zoneId);
 
         validateVolume(caller, ownerId, zoneId, volumeName, url, format, diskOfferingId);
+        DiskOfferingVO diskOffering = _diskOfferingDao.findById(diskOfferingId);
+        if (diskOffering != null && diskOffering.isCustomized()) {
+            if (sizeInGB == null) {
+                throw new InvalidParameterValueException("This disk offering requires a custom size specified");
+            }
+            Long customDiskOfferingMaxSize = VolumeOrchestrationService.CustomDiskOfferingMaxSize.value();
+            Long customDiskOfferingMinSize = VolumeOrchestrationService.CustomDiskOfferingMinSize.value();
+
+            if ((sizeInGB < customDiskOfferingMinSize) || (sizeInGB > customDiskOfferingMaxSize)) {
+                throw new InvalidParameterValueException("Volume size: " + sizeInGB + "GB is out of allowed range. Max: " + customDiskOfferingMaxSize + " Min:" + customDiskOfferingMinSize);
+            }
+        }

Review comment:
       can you extract this and give a good merthod name?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1062765359


   @blueorangutan test matrix


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1063593067


   @nvazquez a Trillian-Jenkins test job (centos7 mgmt + xcpng82) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1063352751


   <b>Trillian test result (tid-3537)</b>
   Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 36210 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6005-t3537-xenserver-71.zip
   Smoke tests completed. 91 look OK, 1 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_12_resize_volume_with_only_size_parameter | `Error` | 3.11 | test_volumes.py
   ContextSuite context=TestVolumes>:teardown | `Error` | 3.13 | test_volumes.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1063291053


   <b>Trillian test result (tid-3538)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 32382 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6005-t3538-kvm-centos7.zip
   Smoke tests completed. 92 look OK, 0 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Pearl1594 commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1065055895


   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1061680464


   @Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Pearl1594 commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1056400282


   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1056891764


   @Pearl1594 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Pearl1594 commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1056890855


   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan removed a comment on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan removed a comment on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1056891764


   @Pearl1594 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1059960730


   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1061364395


   Hi @Pearl1594 it seems the failing test on test_volumes needs fixing, can you please check? The other failing test seems unrelated


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Pearl1594 commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1065004463


   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Pearl1594 commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1065004006


   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1082892716


   XenServer failures still needs to be addressed, moving to 4.18


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1058187275


   @nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1058185812


   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1062765564


   @nvazquez a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Pearl1594 commented on a change in pull request #6005: [WIP] Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on a change in pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#discussion_r809914393



##########
File path: engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
##########
@@ -92,7 +92,7 @@ public VolumeInfo getVolume() {
 
     AsyncCallFuture<VolumeApiResult> resize(VolumeInfo volume);
 
-    void resizeVolumeOnHypervisor(long volumeId, long newSize, long destHostId, String instanceName);
+    void resizeVolumeOnHypervisor(long volumeId, long currentSize, long newSize, long destHostId, String instanceName);

Review comment:
       So currently, https://github.com/apache/cloudstack/blob/9eefc76fc5ef9abf3d74a5cc6c528ca404c707fd/engine/storage/volume/src/main/java/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java#L2429 - uses volume.getSize() as the current Size and newSize is what ever size we want the volume to get resized to. In case of resizing an attached volume, volume.getSize() would be the size to which volume would be resized to. And if I weren't to explicitly pass the actual size of the volume (as it was when on the secondary store) currentSize would be equal to newSize and hence resizing wouldn't happen. Because, with this PR I update the size of the uploaded volume to the size that the disk offering enforces https://github.com/apache/cloudstack/pull/6005/files#diff-b93da5c5293f8cb4470ff6b1642d312131bb053df07b71b4b951b08dff0ad9abR404-R405
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1056401229


   @Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1058780166


   <b>Trillian Build Failed (tid-3476)<b/>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] nvazquez commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
nvazquez commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1063592780


   @blueorangutan test centos7 xcpng82


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1060111473


   <b>Trillian test result (tid-3508)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 44397 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6005-t3508-kvm-centos7.zip
   Smoke tests completed. 90 look OK, 2 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_11_attach_volume_with_unstarted_vm | `Error` | 125.12 | test_volumes.py
   test_disable_oobm_ha_state_ineligible | `Error` | 1511.95 | test_hostha_kvm.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1065056544


   @Pearl1594 a Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Pearl1594 removed a comment on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
Pearl1594 removed a comment on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1056890855


   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1056500773


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 2742


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Pearl1594 commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1061707685


   @blueorangutan test matrix


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Pearl1594 commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1065055766


   @blueorangutanpackage


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1073456267


   @nvazquez a Trillian-Jenkins test job (centos7 mgmt + xcpng82) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1074321166


   <b>Trillian test result (tid-3676)</b>
   Environment: xcpng82 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 54616 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6005-t3676-xcpng82.zip
   Smoke tests completed. 90 look OK, 2 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_12_resize_volume_with_only_size_parameter | `Error` | 2.10 | test_volumes.py
   test_03_deploy_and_scale_kubernetes_cluster | `Failure` | 3664.79 | test_kubernetes_clusters.py
   test_07_deploy_kubernetes_ha_cluster | `Failure` | 3606.93 | test_kubernetes_clusters.py
   test_08_upgrade_kubernetes_ha_cluster | `Failure` | 0.04 | test_kubernetes_clusters.py
   test_09_delete_kubernetes_ha_cluster | `Failure` | 0.04 | test_kubernetes_clusters.py
   ContextSuite context=TestKubernetesCluster>:teardown | `Error` | 47.37 | test_kubernetes_clusters.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #6005: [WIP] Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#discussion_r810895928



##########
File path: engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
##########
@@ -92,7 +92,7 @@ public VolumeInfo getVolume() {
 
     AsyncCallFuture<VolumeApiResult> resize(VolumeInfo volume);
 
-    void resizeVolumeOnHypervisor(long volumeId, long newSize, long destHostId, String instanceName);
+    void resizeVolumeOnHypervisor(long volumeId, long currentSize, long newSize, long destHostId, String instanceName);

Review comment:
       ok, thanks for explaining. I think this is a problem that needs to be addressed for all hypervisors separately. The old size should be retrieved from the hypervisor/primary storage. What we pass here could be off for any number of reasons. This is a bit out of scope here, but can you add a comment to what the problem is?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #6005: [WIP] Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#discussion_r809910378



##########
File path: engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
##########
@@ -92,7 +92,7 @@ public VolumeInfo getVolume() {
 
     AsyncCallFuture<VolumeApiResult> resize(VolumeInfo volume);
 
-    void resizeVolumeOnHypervisor(long volumeId, long newSize, long destHostId, String instanceName);
+    void resizeVolumeOnHypervisor(long volumeId, long currentSize, long newSize, long destHostId, String instanceName);

Review comment:
       I still don't get why it has to be passed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #6005: [WIP] Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on a change in pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#discussion_r809899666



##########
File path: engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
##########
@@ -92,7 +92,7 @@ public VolumeInfo getVolume() {
 
     AsyncCallFuture<VolumeApiResult> resize(VolumeInfo volume);
 
-    void resizeVolumeOnHypervisor(long volumeId, long newSize, long destHostId, String instanceName);
+    void resizeVolumeOnHypervisor(long volumeId, long currentSize, long newSize, long destHostId, String instanceName);

Review comment:
       So why did you add the parameter @Pearl1594 (sincere question, /me too dumb to comprehend)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Pearl1594 commented on a change in pull request #6005: [WIP] Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
Pearl1594 commented on a change in pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#discussion_r809903324



##########
File path: engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
##########
@@ -92,7 +92,7 @@ public VolumeInfo getVolume() {
 
     AsyncCallFuture<VolumeApiResult> resize(VolumeInfo volume);
 
-    void resizeVolumeOnHypervisor(long volumeId, long newSize, long destHostId, String instanceName);
+    void resizeVolumeOnHypervisor(long volumeId, long currentSize, long newSize, long destHostId, String instanceName);

Review comment:
       I added the parameter because, for upload volume, currentSize would be equal to newSize (as both would point to volume.getSize()) if currentSize wasn't explicitly passed as the size of the volume on the secondary store.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Pearl1594 removed a comment on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
Pearl1594 removed a comment on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1065055766


   @blueorangutanpackage


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1063436203


   <b>Trillian test result (tid-3539)</b>
   Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 42705 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6005-t3539-vmware-65u2.zip
   Smoke tests completed. 90 look OK, 2 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_08_arping_in_ssvm | `Failure` | 5.20 | test_diagnostics.py
   test_09_arping_in_cpvm | `Failure` | 5.18 | test_diagnostics.py
   test_02_VPC_default_routes | `Error` | 44.78 | test_vpc_router_nics.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] blueorangutan commented on pull request #6005: Support to resize uploaded volume during attach

Posted by GitBox <gi...@apache.org>.
blueorangutan commented on pull request #6005:
URL: https://github.com/apache/cloudstack/pull/6005#issuecomment-1059960893


   @nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org