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 2021/07/20 12:27:57 UTC

[GitHub] [cloudstack] slavkap opened a new pull request #5225: Fix of shrinking volumes with QCOW2 format

slavkap opened a new pull request #5225:
URL: https://github.com/apache/cloudstack/pull/5225


   ### Description
   
   If the volumes are in QCOW2 format, the shrinking will be handled on
   the agents' side. There are cases in some storage plugins where the
   volumes' format is kept in the DB in QCOW2, but the actual format is raw.
   Till the current implementation, this was limiting the plugins to shrink
   the volumes. Now this will be handled by the storage plugins.
   
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [X] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [X] Minor
   - [ ] Trivial
   
   
   ### How Has This Been Tested?
   manual tests with NFS/StorPool primary storages
   


-- 
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 #5225: Fix of shrinking volumes with QCOW2 format

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



##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -1323,7 +1315,7 @@ private VolumeVO orchestrateResizeVolume(long volumeId, long currentSize, long n
             return volume;
 
         } catch (Exception e) {
-            throw new CloudRuntimeException("Exception caught during resize volume operation of volume UUID: " + volume.getUuid(), e);
+            throw new CloudRuntimeException(String.format("Failed to resize volume operation of volume UUID: [%s] due to - %s", volume.getUuid(), e));

Review comment:
       Sorry if I wasn't clear @slavkap  - yes, I meant what @shwstppr explained - thanks for the fix




-- 
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] svenvogel commented on pull request #5225: Fix of shrinking volumes with QCOW2 format

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


   @shwstppr can you check and a do a forward merge to main? we need this in main too.


-- 
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] shwstppr commented on a change in pull request #5225: Fix of shrinking volumes with QCOW2 format

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



##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -1323,7 +1315,7 @@ private VolumeVO orchestrateResizeVolume(long volumeId, long currentSize, long n
             return volume;
 
         } catch (Exception e) {
-            throw new CloudRuntimeException("Exception caught during resize volume operation of volume UUID: " + volume.getUuid(), e);
+            throw new CloudRuntimeException(String.format("Failed to resize volume operation of volume UUID: [%s] due to - %s", volume.getUuid(), e));

Review comment:
       @slavkap I think @nvazquez meant you keep `e.getMessage()` there but also pass exception object as second param of the `CloudRuntimeException` as it has `CloudRuntimeException(String message, Throwable th)`
   ```suggestion
               throw new CloudRuntimeException(String.format("Failed to resize volume operation of volume UUID: [%s] due to - %s", volume.getUuid(), e.getMessage()), e);
   ```




-- 
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 #5225: Fix of shrinking volumes with QCOW2 format

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


   Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian. SL-JID 627


-- 
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 #5225: Fix of shrinking volumes with QCOW2 format

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


   <b>Trillian test result (tid-1352)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 40270 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5225-t1352-kvm-centos7.zip
   Intermittent failure detected: /marvin/tests/smoke/test_network.py
   Intermittent failure detected: /marvin/tests/smoke/test_password_server.py
   Intermittent failure detected: /marvin/tests/smoke/test_ssvm.py
   Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
   Smoke tests completed. 86 look OK, 1 have error(s)
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 504.78 | test_vpc_redundant.py
   test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Failure` | 478.20 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Failure` | 485.66 | test_vpc_redundant.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] slavkap commented on a change in pull request #5225: Fix of shrinking volumes with QCOW2 format

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



##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -1323,7 +1315,7 @@ private VolumeVO orchestrateResizeVolume(long volumeId, long currentSize, long n
             return volume;
 
         } catch (Exception e) {
-            throw new CloudRuntimeException("Exception caught during resize volume operation of volume UUID: " + volume.getUuid(), e);
+            throw new CloudRuntimeException(String.format("Failed to resize volume operation of volume UUID: [%s] due to - %s", volume.getUuid(), e));

Review comment:
       @shwstppr, thanks! I've misunderstood the comment (sometimes I'm reading selectively... sorry about that)




-- 
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] svenvogel commented on pull request #5225: Fix of shrinking volumes with QCOW2 format

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


   @slavkap Thanks! let me check, i come back. which version?


-- 
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 #5225: Fix of shrinking volumes with QCOW2 format

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


   Looks good, I left only a comment so the exception is not swallowed when an error happens. Happy to merge forward into main as well


-- 
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] shwstppr commented on pull request #5225: Fix of shrinking volumes with QCOW2 format

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


    @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 #5225: Fix of shrinking volumes with QCOW2 format

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


   Merging based on approvals and test results


-- 
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 #5225: Fix of shrinking volumes with QCOW2 format

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


   @shwstppr 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] svenvogel commented on pull request #5225: Fix of shrinking volumes with QCOW2 format

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


   @nvazquez do you merge it forward? thanks for that 😄 


-- 
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 #5225: Fix of shrinking volumes with QCOW2 format

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


   @svenvogel sure, it's now included in the main branch


-- 
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 edited a comment on pull request #5225: Fix of shrinking volumes with QCOW2 format

Posted by GitBox <gi...@apache.org>.
nvazquez edited a comment on pull request #5225:
URL: https://github.com/apache/cloudstack/pull/5225#issuecomment-887419161


   @svenvogel sure, it's now included in the main branch as well


-- 
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 #5225: Fix of shrinking volumes with QCOW2 format

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


   @shwstppr 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] shwstppr commented on pull request #5225: Fix of shrinking volumes with QCOW2 format

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


   @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 merged pull request #5225: Fix of shrinking volumes with QCOW2 format

Posted by GitBox <gi...@apache.org>.
nvazquez merged pull request #5225:
URL: https://github.com/apache/cloudstack/pull/5225


   


-- 
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 #5225: Fix of shrinking volumes with QCOW2 format

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



##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -1323,7 +1315,7 @@ private VolumeVO orchestrateResizeVolume(long volumeId, long currentSize, long n
             return volume;
 
         } catch (Exception e) {
-            throw new CloudRuntimeException("Exception caught during resize volume operation of volume UUID: " + volume.getUuid(), e);
+            throw new CloudRuntimeException(String.format("Failed to resize volume operation of volume UUID: [%s] due to - %s", volume.getUuid(), e.getMessage()));

Review comment:
       Can you include the exception `e` as the second parameter of `CloudRuntimeException` please?




-- 
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] slavkap commented on a change in pull request #5225: Fix of shrinking volumes with QCOW2 format

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



##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -1323,7 +1315,7 @@ private VolumeVO orchestrateResizeVolume(long volumeId, long currentSize, long n
             return volume;
 
         } catch (Exception e) {
-            throw new CloudRuntimeException("Exception caught during resize volume operation of volume UUID: " + volume.getUuid(), e);
+            throw new CloudRuntimeException(String.format("Failed to resize volume operation of volume UUID: [%s] due to - %s", volume.getUuid(), e));

Review comment:
       NP, @nvazquez, I didn't read your suggestion correctly. Thanks all for testing and code review :)




-- 
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