mlsorensen opened a new pull request, #7482:
URL: https://github.com/apache/cloudstack/pull/7482

   ### Description
   
   This PR checks that the NodeList returned from grabbing "source" element on 
a network interface actually returns items before trying to use the first 
element.
   
   Not all network interface XML has a "source" field, so this would break qemu 
hooks from processing in some cases. The index out of bounds exception is 
silently swallowed, because I guess we don't want this to be fatal.
   
   ### 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
   - [x] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [x] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   Ran a few different types of VM XML through the script via:
   
   ```
   cat vm.xml | /etc/libvirt/hooks/qemu vm-name migrate begin -
   ```
   
   Previously no output would be returned, with patch we get VM XML. Not sure 
if there is an existing test framework for these scripts to add some example 
XML to run through it at packaging/build time.
   
   <!-- 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to