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

   Fixes #13825
   
   ### Summary
   
   Prevent `CreateSharedFileSystem` from dereferencing a missing system VM 
template when a zone contains mixed hypervisor types.
   
   ### Root cause
   
   `deploySharedFSVM()` shuffles the supported hypervisors. When a hypervisor 
has no ready system VM template and another hypervisor remains, the existing 
null check fell through to `template.getId()` instead of trying the next 
hypervisor. This caused the reported intermittent NPE for mixed zones such as 
VMware plus External/MaaS.
   
   ### Fix
   
   Skip hypervisors without a ready system VM template while alternatives 
remain. Preserve the existing explicit `CloudRuntimeException` when the final 
candidate also has no template.
   
   ### Validation
   
   - Reproduced the issue twice on the live CloudStack installation using an 
enabled, hostless External cluster alongside VMware; the exact `template is 
null` NPE occurred on the External-first attempt.
   - Removed all temporary clusters and test resources after reproduction; the 
zone returned to its original VMware-only state.
   - The focused regression test fails on the unfixed `4.22` branch with the 
exact NPE.
   - The focused Maven reactor test passes after the fix: 10 tests, 0 failures, 
0 errors.
   
   ### Scope
   
   This is limited to SharedFS hypervisor template selection and its regression 
test. No UI, API contract, database schema, or deployment behavior is changed.
   


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