Notify user if template upgrade is not required#12483
Notify user if template upgrade is not required#12483DaanHoogland merged 1 commit intoapache:4.20from
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #12483 +/- ##
============================================
- Coverage 16.24% 16.23% -0.01%
+ Complexity 13393 13390 -3
============================================
Files 5657 5657
Lines 499107 499108 +1
Branches 60574 60574
============================================
- Hits 81069 81055 -14
- Misses 409001 409014 +13
- Partials 9037 9039 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16465 |
There was a problem hiding this comment.
LGTM
Test Case Summary
| TC | Description | Path | Result |
|---|---|---|---|
| TC1 | Router template upgrade rejected when not required | API | PASSED |
| TC2 | Router template upgrade rejected when not required | UI | PASSED |
| TC3 | Router template upgrade succeeds when upgrade is required | API | PASSED |
TC1: Router template upgrade is not required - API path
Objective: Attempt upgrade via API if no upgrade required
Expected Result: API should reject the attempt with an appropriate error message
Actual Result API rejects the attempt with an appropriate error msg
Test Evidence:
(localcloud) 🐱 > upgradeRouterTemplate id=084973aa-fb35-405c-90fc-260dd7e51db5
🙈 Error: (HTTP 530, error code 4250) Router is already at the latest version. No upgrade required
TC2: Router template upgrade is not required - UI path
Objective: Attempt upgrade via UI if no upgrade required
Expected Result: UI should display an appropriate error message
Actual Result UI displays appropriate error msg
Test Evidence:
Logs Evidence
[root@ref-trl-10696-k-Mol9-rositsa-kyuchukova-mgmt1 ~]# cat /var/log/cloudstack/management/management-server.log | grep -i "already at the latest"
2026-01-23 14:58:35,494 DEBUG [c.c.n.r.VpcVirtualNetworkApplianceManagerImpl] (qtp2038105753-25:[ctx-93a9a23f, ctx-3b6a687a, ctx-09d3ee75]) (logid:7840aa0a) Router: VM instance {"id":4,"instanceName":"r-4-VM","state":"Running","type":"DomainRouter","uuid":"084973aa-fb35-405c-90fc-260dd7e51db5"} is already at the latest version. No upgrade required
2026-01-23 14:58:35,495 ERROR [c.c.a.ApiServer] (qtp2038105753-25:[ctx-93a9a23f, ctx-3b6a687a, ctx-09d3ee75]) (logid:7840aa0a) unhandled exception executing api command: [Ljava.lang.String;@3f9601ee com.cloud.utils.exception.CloudRuntimeException: Router is already at the latest version. No upgrade required
2026-01-23 14:59:43,330 DEBUG [c.c.n.r.VpcVirtualNetworkApplianceManagerImpl] (qtp2038105753-22:[ctx-6a7ccb59, ctx-0125cb45]) (logid:d7d1c3f7) Router: VM instance {"id":4,"instanceName":"r-4-VM","state":"Running","type":"DomainRouter","uuid":"084973aa-fb35-405c-90fc-260dd7e51db5"} is already at the latest version. No upgrade required
2026-01-23 14:59:43,330 ERROR [c.c.a.ApiServer] (qtp2038105753-22:[ctx-6a7ccb59, ctx-0125cb45]) (logid:d7d1c3f7) unhandled exception executing api command: [Ljava.lang.String;@62f0692f com.cloud.utils.exception.CloudRuntimeException: Router is already at the latest version. No upgrade required
TC3: Router template upgrade possible when upgrade is required
Objective Verify router template upgrade succeeds when router uses outdated SystemVM template
Actual Result: API returns async job ID (upgrade triggered)
Test Evidence
(localcloud) 🐱 > upgradeRouterTemplate id=084973aa-fb35-405c-90fc-260dd7e51db5
{
"asyncjobs": [
{
"jobid": "d01c5007-6282-4c99-a7a1-7c54dc124c29"
}
],
"count": 1
}
* 4.22: fix install path for systemvm templates when introducing new sec storage (#11605) fix Sensitive Data Exposure Through Exception Logging in OVM Hypervis… (#12032) Fix snapshot physical size after migration (#12166) ConfigDrive: use file absolute path instead of canonical path to create ISO (#11623) Add log for null templateVO (#12406) snapshot: fix listSnapshots for volume which got delete and whose storage pool got deleted (#12433) Notify user if template upgrade is not required (#12483) Fix: proper permissions for systemvm template registrations on hardened systems (#12098) Allow modification of user vm details if user.vm.readonly.details is empty (#10456) NPE fix while deleting storage pool when pool has detached volumes (#12451)
Description
This PR adds a notification in case Router is with latest template version . As of now it shows Upgrade is done, which gives wrong impression if no upgrade is performed.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
Before:

After:

Log message:

How Has This Been Tested?
How did you try to break this feature and the system with this change?