Uh oh!
There was an error while loading. Please reload this page.
Fix for usage server getting stuck due to duplicate VM events - #13019
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## 4.20 #13019 +/- ##
=========================================
Coverage 16.26% 16.27% - Complexity 13433 13439 +6
=========================================
Files 5665 5666 +1 Lines 500530 500557 +27 Branches 60787 60789 +2 =========================================
+ Hits 81411 81444 +33 + Misses 410027 410009 -18 - Partials 9092 9104 +12
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:
|
sureshanaparti
commented
Apr 14, 2026
@blueorangutan package |
blueorangutan
commented
Apr 14, 2026
@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. |
blueorangutan
commented
Apr 14, 2026
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17484 |
DaanHoogland
left a comment
There was a problem hiding this comment.
@abh1sar I do not think this change is the best way to go. First an upgrade patch for minor version should be implicit, expecially if no actual changes are in the specific upgrade script. Second, the create schema script should be for 4.0 and all other changes should be entered in the upgrade scripts.
DaanHoogland
commented
Apr 15, 2026
|
DaanHoogland
commented
Apr 15, 2026
@blueorangutan package |
blueorangutan
commented
Apr 15, 2026
@DaanHoogland 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. |
blueorangutan
commented
Apr 15, 2026
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17506 |
DaanHoogland
left a comment
There was a problem hiding this comment.
we will have to make sure this happens for 22.1 and 23.0 as well.
DaanHoogland
commented
Apr 16, 2026
@blueorangutan test |
blueorangutan
commented
Apr 16, 2026
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
blueorangutan
commented
Apr 16, 2026
[SF] Trillian test result (tid-15897)
|
Uh oh!
There was an error while loading. Please reload this page.
winterhazel
left a comment
There was a problem hiding this comment.
Code looks good, needs upgrade testing
winterhazel
commented
Jun 11, 2026
Tested the upgrade. It looks ok. |
winterhazel
commented
Jun 12, 2026
This one needs to be included in the 4.22.2 and 4.23.0 upgrade paths as well. I intend to include it while performing the merge forward. |
Description
This PR fixes#12590
Fix is to remove the unique key constraint from the
usage_vm_instancetable.The constraint is not required, and can cause issues with usage processing.
The other helper tables either don't have a constraint or duplicate events cannot happen as the event is generated only at create.
In case of VM instance the event is generated at every Start which makes it susceptible to duplicate events.
Added change in the upgrade path as well as in
create-schema-premium.sqlTypes of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
To test, I added 2 VM.START events to the usage_event table with the same

createdtime (id 18 and 20) and set theusage.stats.job.aggregation.rangeto 5 (minutes)Without the fix the usage server was stuck processing that interval

After removing the unique constraint, usage server finished successfully and generated the correct usage.

How did you try to break this feature and the system with this change?