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/06 06:34:17 UTC

[GitHub] [cloudstack] shwstppr opened a new pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

shwstppr opened a new pull request #5387:
URL: https://github.com/apache/cloudstack/pull/5387


   ### Description
   
   Fixes NPE when UEFI is used for boot mode but no boot type is passed.
   ```
   ERROR [c.c.a.ApiServer] (qtp661543645-300:ctx-3e8b622e ctx-0499e8d9) (logid:980273bb) unhandled exception executing api command: [Ljava.lang.String;@69003076
   java.lang.NullPointerException
   	at org.apache.cloudstack.api.command.user.vm.DeployVMCmd.getDetails(DeployVMCmd.java:296)
   	at com.cloud.vm.UserVmManagerImpl.createVirtualMachine(UserVmManagerImpl.java:5253)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
   	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
   	at com.sun.proxy.$Proxy199.createVirtualMachine(Unknown Source)
   	at org.apache.cloudstack.api.command.user.vm.DeployVMCmd.create(DeployVMCmd.java:719)
   ```
   <!--- ********************************************************************************* -->
   <!--- 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
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   <!-- 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 -->
   
   Using cmk:
   
   **With empty bootmode and boottype=UEFI**
   ```
   (local) 🙉 > deploy virtualmachine zoneid=681d6964-e25b-4d5d-866b-7dab67ee292c templateid=cc517531-076b-11ec-9cda-645d8651f45a serviceofferingid=c0cdd2af-2126-4f5f-8b21-b7d4353f6b12 boottype=UEFI bootmode=
   🙈 Error: (HTTP 431, error code 4350) bootmode must be specified for the VM with boot type: UEFI. Valid values are: [LEGACY, SECURE]
   ```
   
   **With invalid bootmode and boottype=UEFI**
   ```
   (local) 🙊 > deploy virtualmachine zoneid=681d6964-e25b-4d5d-866b-7dab67ee292c templateid=cc517531-076b-11ec-9cda-645d8651f45a serviceofferingid=c0cdd2af-2126-4f5f-8b21-b7d4353f6b12 boottype=UEFI bootmode=SEC
   🙈 Error: (HTTP 431, error code 4350) Invalid bootmode: SEC specified for VM: null. Valid values are: [LEGACY, SECURE]
   ```
   
   **With valid bootmode and boottype=UEFI**
   ```
   (local) 🐈 > deploy virtualmachine zoneid=681d6964-e25b-4d5d-866b-7dab67ee292c templateid=cc517531-076b-11ec-9cda-645d8651f45a serviceofferingid=c0cdd2af-2126-4f5f-8b21-b7d4353f6b12 boottype=UEFI bootmode=SECURE
   {
     "virtualmachine": {
       "account": "admin",
       "affinitygroup": [],
       "bootmode": "secure",
       "boottype": "Uefi",
       "cpunumber": 1,
       "cpuspeed": 500,
       "created": "2021-08-31T16:17:12+0530",
       "details": {
         "UEFI": "SECURE"
       },
       "displayname": "QA-88fabf69-c2ad-4a49-ab95-be250c00eec1",
   ```
   
   **With no bootmode and boottype=BIOS**
   ```
   (local) 🐙 > deploy virtualmachine zoneid=681d6964-e25b-4d5d-866b-7dab67ee292c templateid=cc517531-076b-11ec-9cda-645d8651f45a serviceofferingid=c0cdd2af-2126-4f5f-8b21-b7d4353f6b12 boottype=BIOS
   {
     "virtualmachine": {
       "account": "admin",
       "affinitygroup": [],
       "bootmode": "legacy",
       "boottype": "Bios",
       "cpunumber": 1,
       "cpuspeed": 500,
       "created": "2021-08-31T16:42:43+0530",
       "details": {},
       "displayname": "QA-835e0877-98e2-4e6a-a807-ee5551880172",
   ```
   
   **With empty bootmode and boottype=BIOS**
   ```
   (local) 🐿 > deploy virtualmachine zoneid=681d6964-e25b-4d5d-866b-7dab67ee292c templateid=cc517531-076b-11ec-9cda-645d8651f45a serviceofferingid=c0cdd2af-2126-4f5f-8b21-b7d4353f6b12 boottype=BIOS bootmode=
   {
     "virtualmachine": {
       "account": "admin",
       "affinitygroup": [],
       "bootmode": "legacy",
       "boottype": "Bios",
       "cpunumber": 1,
       "cpuspeed": 500,
       "created": "2021-08-31T16:43:35+0530",
       "details": {},
       "displayname": "QA-e3a64620-9499-4770-81b1-6758b7fe057d",
   ```
   
   **Without bootmode and boottype**
   ```
   (local) 🐋 > deploy virtualmachine zoneid=681d6964-e25b-4d5d-866b-7dab67ee292c templateid=cc517531-076b-11ec-9cda-645d8651f45a serviceofferingid=c0cdd2af-2126-4f5f-8b21-b7d4353f6b12
   {
     "virtualmachine": {
       "account": "admin",
       "affinitygroup": [],
       "bootmode": "legacy",
       "boottype": "Bios",
       "cpunumber": 1,
       "cpuspeed": 500,
       "created": "2021-08-31T16:42:49+0530",
       "details": {},
       "displayname": "QA-57c6e8c2-8327-43a6-9d9c-52c14fe72a3c",
   ```


-- 
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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -293,7 +292,8 @@ public Long getDomainId() {
             }
         }
         if (ApiConstants.BootType.UEFI.equals(getBootType())) {

Review comment:
       @sureshanaparti as discussed offline, I've refactored changes to throw exception when bootmode is empty for boottype=UEFI




-- 
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 #5387: api, ui: fix NPE with deployVirtualMachine when null boottype

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


   


-- 
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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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






-- 
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 commented on pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


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


-- 
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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @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] nvazquez commented on pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @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] weizhouapache commented on pull request #5387: api, ui: fix NPE with deployVirtualMachine when null boottype

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


   > @blueoranutan package
   > @weizhouapache can you please check now
   
   @shwstppr I have tested ui as well, looks good to me. cc @rhtyd 


-- 
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 closed pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   


-- 
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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @rhtyd 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] rhtyd commented on pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @DaanHoogland 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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @blueoranutan package
   @weizhouapache can you please check now


-- 
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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @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] shwstppr commented on a change in pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -293,7 +292,8 @@ public Long getDomainId() {
             }
         }
         if (ApiConstants.BootType.UEFI.equals(getBootType())) {

Review comment:
       @sureshanaparti as discussed offline, I've refactored changes to throw exception when bootmode is empty for boottype=UEFI
   
   ```
   (local) 🙉 > deploy virtualmachine zoneid=681d6964-e25b-4d5d-866b-7dab67ee292c templateid=cc517531-076b-11ec-9cda-645d8651f45a serviceofferingid=c0cdd2af-2126-4f5f-8b21-b7d4353f6b12 boottype=UEFI bootmode=
   🙈 Error: (HTTP 431, error code 4350) bootmode must be specified for the VM with boot type: UEFI. Valid values are: [LEGACY, SECURE]
   ```




-- 
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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -293,7 +292,8 @@ public Long getDomainId() {
             }
         }
         if (ApiConstants.BootType.UEFI.equals(getBootType())) {

Review comment:
       @sureshanaparti ^^




-- 
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 #5387: api, ui: fix NPE with deployVirtualMachine when null boottype

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






-- 
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 commented on a change in pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -293,7 +292,8 @@ public Long getDomainId() {
             }
         }
         if (ApiConstants.BootType.UEFI.equals(getBootType())) {

Review comment:
       Suresh's comment makes sense, kindly discuss and conclude @shwstppr 




-- 
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] sureshanaparti commented on a change in pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -293,7 +292,8 @@ public Long getDomainId() {
             }
         }
         if (ApiConstants.BootType.UEFI.equals(getBootType())) {

Review comment:
       @shwstppr I think, no need to add (empty) boot type to custom parameters when boot mode is not specified.
   
   ```suggestion
           if (getBootMode() != null && ApiConstants.BootType.UEFI.equals(getBootType())) {
   ```




-- 
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 commented on pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @shwstppr is it no longer valid? 


-- 
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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


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


-- 
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 commented on pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @shwstppr are these tests related to this PR?
   @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] weizhouapache commented on pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   manually tested ok.
   
   issue can be reproduced without this pr. with this pr, the NPE issue is fixed.
   ![Screenshot from 2021-09-06 09-16-22](https://user-images.githubusercontent.com/57355700/132175821-9f8b69de-4502-4b92-888b-bbaab9d509fe.png)
   
   As Rohit suggested, can you add a quick fix on UI ? for example, use 'SECURE' as default value ?
   ![Screenshot from 2021-09-06 09-15-37](https://user-images.githubusercontent.com/57355700/132175814-a38ab19c-2a21-4181-ad57-2c8a9047d816.png)
   


-- 
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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @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] DaanHoogland commented on pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @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] blueorangutan commented on pull request #5387: api, ui: fix NPE with deployVirtualMachine when null boottype

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


   @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] shwstppr commented on a change in pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -293,7 +292,8 @@ public Long getDomainId() {
             }
         }
         if (ApiConstants.BootType.UEFI.equals(getBootType())) {

Review comment:
       Not sure abt this as in UI we allow empty boot mode and if we are skipping here, we will have to handle UI better by not allowing empty boot mode when UEFI is selected as boot type. Otherwise, user will expect VM to boot with UEFI just by changing the boot type.
   @rhtyd @nvazquez @davidjumani any comments on the behaviour?
   I feel maybe we should just handle the NPE in 4.15 and refactor boot options handling in UI & API in a separate PR for 4.16




-- 
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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   <b>Trillian test result (tid-1871)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 57677 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5387-t1871-kvm-centos7.zip
   Smoke tests completed. 87 look OK, 4 have errors
   Only failed tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_deploy_vm_start_failure | `Error` | 60.66 | test_deploy_vm.py
   test_deploy_vm_volume_creation_failure | `Error` | 63.62 | test_deploy_vm.py
   test_vm_ha | `Error` | 60.43 | test_vm_ha.py
   test_vm_sync | `Error` | 127.71 | test_vm_sync.py
   test_01_redundant_vpc_site2site_vpn | `Failure` | 250.69 | test_vpc_vpn.py
   test_01_vpc_site2site_vpn_multiple_options | `Failure` | 374.42 | test_vpc_vpn.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 #5387: api, ui: fix NPE with deployVirtualMachine when null boottype

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


   UI build: :heavy_check_mark:
   Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/5387 (SL-JID-606)


-- 
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 #5387: api, ui: fix NPE with deployVirtualMachine when null boottype

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


   @blueorangutan ui


-- 
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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -293,7 +292,8 @@ public Long getDomainId() {
             }
         }
         if (ApiConstants.BootType.UEFI.equals(getBootType())) {

Review comment:
       Not sure abt this as in UI we allow empty boot mode and if we are skipping here, we will have to handle UI better by not allowing empty boot mode when UEFI is selected as boot type. Otherwise, user will expect VM to boot with UEFI just by changing the boot type.
   @rhtyd @nvazquez @davidjumani any comments on the behaviour?
   I feel maybe we should just handle the NPE in 4.15 and refactor boot options handling in UI & API in a separate PR for 4.16

##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -293,7 +292,8 @@ public Long getDomainId() {
             }
         }
         if (ApiConstants.BootType.UEFI.equals(getBootType())) {

Review comment:
       @sureshanaparti ^^

##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -293,7 +292,8 @@ public Long getDomainId() {
             }
         }
         if (ApiConstants.BootType.UEFI.equals(getBootType())) {

Review comment:
       @sureshanaparti as discussed offline, I've refactored changes to throw exception when bootmode is empty for boottype=UEFI

##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -293,7 +292,8 @@ public Long getDomainId() {
             }
         }
         if (ApiConstants.BootType.UEFI.equals(getBootType())) {

Review comment:
       @sureshanaparti as discussed offline, I've refactored changes to throw exception when bootmode is empty for boottype=UEFI
   
   ```
   (local) 🙉 > deploy virtualmachine zoneid=681d6964-e25b-4d5d-866b-7dab67ee292c templateid=cc517531-076b-11ec-9cda-645d8651f45a serviceofferingid=c0cdd2af-2126-4f5f-8b21-b7d4353f6b12 boottype=UEFI bootmode=
   🙈 Error: (HTTP 431, error code 4350) bootmode must be specified for the VM with boot type: UEFI. Valid values are: [LEGACY, SECURE]
   ```




-- 
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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @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] rhtyd commented on pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @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 #5387: api, ui: fix NPE with deployVirtualMachine when null boottype

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


   UI build: :heavy_check_mark:
   Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/5387 (SL-JID-607)


-- 
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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   <b>Trillian test result (tid-1824)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 32372 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5387-t1824-kvm-centos7.zip
   Smoke tests completed. 87 look OK, 0 have error(s)
   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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @rhtyd 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] rhtyd commented on a change in pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -293,7 +292,8 @@ public Long getDomainId() {
             }
         }
         if (ApiConstants.BootType.UEFI.equals(getBootType())) {

Review comment:
       Suresh's comment makes sense, kindly discuss and conclude @shwstppr 




-- 
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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @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] shwstppr commented on a change in pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -293,7 +292,8 @@ public Long getDomainId() {
             }
         }
         if (ApiConstants.BootType.UEFI.equals(getBootType())) {

Review comment:
       @sureshanaparti as discussed offline, I've refactored changes to throw exception when bootmode is empty for boottype=UEFI

##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -293,7 +292,8 @@ public Long getDomainId() {
             }
         }
         if (ApiConstants.BootType.UEFI.equals(getBootType())) {

Review comment:
       @sureshanaparti as discussed offline, I've refactored changes to throw exception when bootmode is empty for boottype=UEFI
   
   ```
   (local) 🙉 > deploy virtualmachine zoneid=681d6964-e25b-4d5d-866b-7dab67ee292c templateid=cc517531-076b-11ec-9cda-645d8651f45a serviceofferingid=c0cdd2af-2126-4f5f-8b21-b7d4353f6b12 boottype=UEFI bootmode=
   🙈 Error: (HTTP 431, error code 4350) bootmode must be specified for the VM with boot type: UEFI. Valid values are: [LEGACY, SECURE]
   ```




-- 
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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   <b>Trillian Build Failed (tid-1891)<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] blueorangutan commented on pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   <b>Trillian test result (tid-1914)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 35061 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5387-t1914-kvm-centos7.zip
   Smoke tests completed. 87 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] rhtyd commented on a change in pull request #5387: api: fix NPE with deployVirtualMachine when null boottype

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



##########
File path: api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -293,7 +292,8 @@ public Long getDomainId() {
             }
         }
         if (ApiConstants.BootType.UEFI.equals(getBootType())) {

Review comment:
       Suresh's comment makes sense, kindly discuss and conclude @shwstppr 




-- 
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 #5387: api, ui: fix NPE with deployVirtualMachine when null boottype

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


   @weizhouapache a Jenkins job has been kicked to build UI QA env. 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] shwstppr removed a comment on pull request #5387: api, ui: fix NPE with deployVirtualMachine when null boottype

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


   @blueorangutan utan 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 #5387: api, ui: fix NPE with deployVirtualMachine when null boottype

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


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


-- 
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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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






-- 
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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


   @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 #5387: api: fix NPE with deployVirtualMachine when null boottype

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


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