You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "nagaboinaramgopal (via GitHub)" <gi...@apache.org> on 2026/09/08 23:39:14 UTC
[PR] Skip hypervisors with no systemvm template when creating a shared filesystem [cloudstack]
nagaboinaramgopal opened a new pull request, #14086:
URL: https://github.com/apache/cloudstack/pull/14086
### Description
Creating a shared filesystem fails with a NullPointerException in a zone that has more than one hypervisor type when one of those types has no systemvm template (for example an External or MaaS cluster next to a KVM cluster).
deploySharedFSVM walks the zone's supported hypervisors looking for one with a systemvm template, but it only threw when the template was missing on the last hypervisor. A missing template on any earlier one fell through to template.getId() and hit the NPE. Because the hypervisor list is shuffled, this failed at random.
Now a hypervisor with no template is skipped and the loop moves to the next one, and it only throws when none of them has a template. This mirrors the continue-on-hasNext handling already used for InsufficientCapacityException further down the same loop.
Fixes: #13825
### 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)
- [ ] Build/CI
- [ ] Test (unit or integration test code)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [ ] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [x] Minor
- [ ] Trivial
### Screenshots (if appropriate):
N/A
### How Has This Been Tested?
Added a unit test with two supported hypervisors where neither has a systemvm template. Before this change the deploy throws a NullPointerException, after it throws the intended CloudRuntimeException that says the template was not found. The existing shared filesystem lifecycle tests still pass.
#### How did you try to break this feature and the system with this change?
Checked the single hypervisor case still throws the same not-found error, so there is no regression when only one type is supported. The change only adds a skip to the next hypervisor when a template is missing and never touches the path where a template is found, so a normal deploy is unaffected.
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Skip hypervisors with no systemvm template when creating a shared filesystem [cloudstack]
Posted by "nagaboinaramgopal (via GitHub)" <gi...@apache.org>.
nagaboinaramgopal closed pull request #14086: Skip hypervisors with no systemvm template when creating a shared filesystem
URL: https://github.com/apache/cloudstack/pull/14086
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Skip hypervisors with no systemvm template when creating a shared filesystem [cloudstack]
Posted by "nagaboinaramgopal (via GitHub)" <gi...@apache.org>.
nagaboinaramgopal commented on PR #14086:
URL: https://github.com/apache/cloudstack/pull/14086#issuecomment-5594901894
Closing as a duplicate. I see #13830 already merged the same fix for #13825 (skip hypervisors without a system template, keep the final CloudRuntimeException). Thanks @Dogface2k, that covers it.
--
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org