Skip to content

sharedfs: skip hypervisors without system templates - #13830

Open
Dogface2k wants to merge 1 commit into
apache:4.22from
Dogface2k:fix/issue-13825-sharedfs-template
Open

sharedfs: skip hypervisors without system templates#13830
Dogface2k wants to merge 1 commit into
apache:4.22from
Dogface2k:fix/issue-13825-sharedfs-template

Conversation

@Dogface2k

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant