Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #14864 +/- ##
============================================
- Coverage 18.34% 18.33% -0.01%
- Complexity 16669 16687 +18
============================================
Files 5939 5940 +1
Lines 537819 538186 +367
Branches 65941 65941
============================================
+ Hits 98638 98696 +58
- Misses 427960 428261 +301
- Partials 11221 11229 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Verified working, both halves. Verified on CloudStack 4.22.1.1, packages rebuilt from patched source. KVM on Ubuntu 24.04.4 LTS, Pure FA-X20R4, Purity//FA 6.10.6, provider Flash Array, FibreChannel. Renamed the array host object b08-36 to b08-36-fc so it no longer matched the CloudStack host name. #14862 - deploying a VM pinned to that host no longer throws NullPointerException ... FlashArrayList.getItems() because "list" is null. The lookup failure is logged and the planner adds the host to the avoid set. #14863 - attaching a volume to a VM already running on that host now gives: On 4.22.1.1 this surfaces as Failed to spool template disk at path: ... connid.b08-36-fc=2;, which gives no hint that host naming is involved. One small thing: findHost() catches Exception rather than the 400 specifically, so a timeout, TLS failure or expired token also becomes "not found" - and the administrator is then told to rename host objects when the array is simply unreachable. cc: @Damans227 Can you please check the last point on this |
@prashanthr2 thanks for testing. pushed a fix, now only a 400 from the array counts as not found. a timeout, login or connection failure fails with its own error instead of the rename message. |
Fixes #14862
Fixes #14863
When a KVM host has no host object with the same name on the FlashArray, the host lookup crashes, which fails VM deployment outright, and attach fails with an error about revoking access that says nothing about the name. This makes the lookup return "not found" so the planner just skips that host, and attach now fails with a message that names the host and says the names must match.
Test:
Rename the array host object for one KVM host (
purehost rename b08-36 b08-36-fc), then deploy a VM and attach a volume to a VM on that host.Before: deploy crashes, attach error points at revoking access.
After: deploy on that host fails cleanly, deploy without a host lands on the other host, attach says what is wrong.
Also added unit tests for the host lookup.