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/09/28 08:27:00 UTC

[GitHub] [cloudstack] Pearl1594 opened a new pull request #5515: simulator: Add support to scale a VM

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


   ### Description
   
   This PR addresses https://github.com/apache/cloudstack/issues/5508 - where in vm scale operation is not allowed even when there is no resizing required to be performed.
   <!--- 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)
   - [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)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [X] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   1. Performed scale VM operation from one compute (fixed) offering type w/o root disk size to another - successful
   2. Performed scale VM operation from a compute(fixed) offering  w/o root disk size to a custom constrained / unconstrained offering without any root disk size - successful
   3. performed scale VM operation from a compute offering with root disk size to a one without any root disk size  - successful
   4. performed scaleVM operation from a compute offering w/o root disk size to a one with root disk size specified - fails with:
   ![image](https://user-images.githubusercontent.com/10495417/134904731-be6cb38f-9099-4761-9ce0-8978b460a9d8.png)
   
   
   
   <!-- 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] weizhouapache commented on pull request #5515: simulator: Add support to scale a VM

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


   @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 #5515: simulator: Add support to scale a VM

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


   @weizhouapache 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] blueorangutan commented on pull request #5515: simulator: Add support to scale a VM

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


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


-- 
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 #5515: simulator: Add support to scale a VM

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


   <b>Trillian test result (tid-2226)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 31813 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5515-t2226-kvm-centos7.zip
   Smoke tests completed. 89 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] blueorangutan commented on pull request #5515: simulator: Add support to scale a VM

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






-- 
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 #5515: simulator: Add support to scale a VM

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


   @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] GutoVeronezi commented on a change in pull request #5515: simulator: Add support to scale a VM

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



##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -965,10 +965,9 @@ public VolumeVO resizeVolume(ResizeVolumeCmd cmd) throws ResourceAllocationExcep
         /* Only works for KVM/XenServer/VMware (or "Any") for now, and volumes with 'None' since they're just allocated in DB */
 
         HypervisorType hypervisorType = _volsDao.getHypervisorType(volume.getId());
-
-        if (hypervisorType != HypervisorType.KVM && hypervisorType != HypervisorType.XenServer
-                && hypervisorType != HypervisorType.VMware && hypervisorType != HypervisorType.Any
-                && hypervisorType != HypervisorType.None) {
+        List<HypervisorType> supportedHypervisors = Arrays.asList(HypervisorType.KVM, HypervisorType.XenServer,

Review comment:
       Nice!
   
   I would just suggest you to turn it into a constant, to avoid recreating it every time.




-- 
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] weizhouapache closed pull request #5515: simulator: Add support to scale a VM

Posted by GitBox <gi...@apache.org>.
weizhouapache closed pull request #5515:
URL: https://github.com/apache/cloudstack/pull/5515


   


-- 
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] GutoVeronezi commented on a change in pull request #5515: simulator: Add support to scale a VM

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



##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -965,10 +965,9 @@ public VolumeVO resizeVolume(ResizeVolumeCmd cmd) throws ResourceAllocationExcep
         /* Only works for KVM/XenServer/VMware (or "Any") for now, and volumes with 'None' since they're just allocated in DB */
 
         HypervisorType hypervisorType = _volsDao.getHypervisorType(volume.getId());
-
-        if (hypervisorType != HypervisorType.KVM && hypervisorType != HypervisorType.XenServer
-                && hypervisorType != HypervisorType.VMware && hypervisorType != HypervisorType.Any
-                && hypervisorType != HypervisorType.None) {
+        List<HypervisorType> supportedHypervisors = Arrays.asList(HypervisorType.KVM, HypervisorType.XenServer,

Review comment:
       Nice!
   
   I would just suggest you to turn it into a constant, to avoid recreating it every time.




-- 
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 #5515: simulator: Add support to scale a VM

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


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


-- 
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 #5515: simulator: Add support to scale a VM

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


   @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 #5515: simulator: Add support to scale a VM

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


   @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] rhtyd merged pull request #5515: simulator: Add support to scale a VM

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


   


-- 
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 #5515: simulator: Add support to scale a VM

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


   @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] GutoVeronezi commented on a change in pull request #5515: simulator: Add support to scale a VM

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



##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -965,10 +965,9 @@ public VolumeVO resizeVolume(ResizeVolumeCmd cmd) throws ResourceAllocationExcep
         /* Only works for KVM/XenServer/VMware (or "Any") for now, and volumes with 'None' since they're just allocated in DB */
 
         HypervisorType hypervisorType = _volsDao.getHypervisorType(volume.getId());
-
-        if (hypervisorType != HypervisorType.KVM && hypervisorType != HypervisorType.XenServer
-                && hypervisorType != HypervisorType.VMware && hypervisorType != HypervisorType.Any
-                && hypervisorType != HypervisorType.None) {
+        List<HypervisorType> supportedHypervisors = Arrays.asList(HypervisorType.KVM, HypervisorType.XenServer,

Review comment:
       Nice!
   
   I would just suggest you to turn it into a constant, to avoid recreating it every time.




-- 
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] rhtyd merged pull request #5515: simulator: Add support to scale a VM

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


   


-- 
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] weizhouapache closed pull request #5515: simulator: Add support to scale a VM

Posted by GitBox <gi...@apache.org>.
weizhouapache closed pull request #5515:
URL: https://github.com/apache/cloudstack/pull/5515


   


-- 
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 #5515: simulator: Add support to scale a VM

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


   @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] weizhouapache commented on pull request #5515: simulator: Add support to scale a VM

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


   @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