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

   ### Description
   
   checkForRaceAndAllocateNic dereferenced the requested NicProfile when a
   concurrent deploy had already taken the IP (persistNicAfterRaceCheck returned
   null). On the common path the user requests no explicit IP, so requested is 
null
   and the losing thread threw a NullPointerException instead of nulling the IP 
and
   retrying. This defeats the ipv4AllocationRaceCheck retry for exactly the 
case it
   was written for: many VMs deploying onto one guest network at once (bulk 
deploy,
   autoscale groups, Kubernetes/CKS node provisioning).
   
   Null-guard the requested profile so a lost race retries the allocation.
   
   ### Types of changes
   
   - [x] Bug fix (non-breaking change which fixes an issue)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Bug Severity
   
   - [x] Minor
   
   ### How Has This Been Tested?
   
   Added a unit test that simulates losing the allocation race with no explicit 
IP
   requested and asserts the allocation is retried rather than throwing a
   NullPointerException. Also built the standard packages and deployed on a KVM
   advanced zone.


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