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 2020/05/18 12:33:58 UTC

[GitHub] [cloudstack] DaanHoogland opened a new pull request #4089: extra guard in vmwareresource

DaanHoogland opened a new pull request #4089:
URL: https://github.com/apache/cloudstack/pull/4089


   ## Description
   <!--- Describe your changes in detail -->
   guard against UEFI/LEGACY
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   Do not allow legacy boot mode in UEFI boot type to prevent vsphere corruption
   
   <!-- 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: #4088
   
   ## Types of changes
   <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
   - [ ] 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)
   
   ## 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/master/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.

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



[GitHub] [cloudstack] pavanaravapalli commented on a change in pull request #4089: extra guard in vmwareresource

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



##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -2286,12 +2286,22 @@ protected StartAnswer execute(StartCommand cmd) {
             }
 
             if (StringUtils.isNotBlank(bootMode) && !bootMode.equalsIgnoreCase("bios")) {
+                if (s_logger.isTraceEnabled()) {
+                    s_logger.trace(String.format("booting %s in %s mode and type %s",
+                            vmInternalCSName,
+                            bootMode,
+                            vmSpec.getDetails().containsKey(ApiConstants.BootType.UEFI.toString()) ? vmSpec.getDetails().get(ApiConstants.BootType.UEFI.toString()) : "<nada>"));
+                }
                 vmConfigSpec.setFirmware("efi");
                 if (vmSpec.getDetails().containsKey(ApiConstants.BootType.UEFI.toString()) && "secure".equalsIgnoreCase(vmSpec.getDetails().get(ApiConstants.BootType.UEFI.toString()))) {
                     VirtualMachineBootOptions bootOptions = new VirtualMachineBootOptions();
                     bootOptions.setEfiSecureBootEnabled(true);
                     vmConfigSpec.setBootOptions(bootOptions);
                 }
+                else

Review comment:
       @DaanHoogland I have  not tested  but code LGTM. 




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

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



[GitHub] [cloudstack] DaanHoogland closed pull request #4089: extra guard in vmwareresource

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


   


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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4089: extra guard in vmwareresource

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


   closing due to false alarm


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

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



[GitHub] [cloudstack] DaanHoogland commented on pull request #4089: extra guard in vmwareresource

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


   @pavanaravapalli unfortunately this change does not seem to give the system enough protection. I have been able to break it based on this PR :(


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

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



[GitHub] [cloudstack] blueorangutan commented on pull request #4089: extra guard in vmwareresource

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


   Packaging result: ✔centos7 ✔debian. JID-1231


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

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