Added events for snapshots, vmsnapshots, internalLB operations#11230
Added events for snapshots, vmsnapshots, internalLB operations#11230harikrishna-patnala merged 7 commits intoapache:4.19from
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.19 #11230 +/- ##
============================================
- Coverage 15.18% 15.17% -0.01%
+ Complexity 11364 11359 -5
============================================
Files 5415 5415
Lines 475888 475909 +21
Branches 58094 58096 +2
============================================
- Hits 72256 72226 -30
- Misses 395546 395602 +56
+ Partials 8086 8081 -5
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:
|
server/src/main/java/com/cloud/resource/ResourceManagerImpl.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds event logging and annotations for snapshot, VM snapshot, and internal load balancer operations to improve system auditing and monitoring. The changes focus on adding ActionEvent annotations to existing methods and updating event handling.
- Adds ActionEvent annotations to snapshot creation, host maintenance, and internal LB operations
- Removes manual event logging in favor of annotation-based approach for host maintenance
- Updates test infrastructure to mock ActionEventUtils for internal LB tests
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| SnapshotManagerImpl.java | Adds event annotation for snapshot creation from VM snapshot |
| ResourceManagerImpl.java | Adds event annotations for host maintenance and reconnect operations, removes manual event call |
| InternalLoadBalancerVMManagerImpl.java | Adds event annotations for internal LB VM start and stop operations |
| InternalLBVMServiceTest.java | Updates test to mock ActionEventUtils static calls |
| CreateSnapshotFromVMSnapshotCmd.java | Adds getApiResourceId method for proper resource identification |
| import org.junit.Test; | ||
| import org.junit.runner.RunWith; | ||
| import org.mockito.BDDMockito; | ||
| import org.mockito.Matchers; |
There was a problem hiding this comment.
The import 'org.mockito.Matchers' is deprecated. Use 'org.mockito.ArgumentMatchers' instead, which is already imported.
| import org.mockito.Matchers; |
There was a problem hiding this comment.
@harikrishna-patnala , does this make sense?
it requires line 116 to have a simple adjustment as well.
|
@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 ✔️ debian ✔️ suse15. SL-JID 14291 |
3fbb7f7 to
c620018
Compare
|
@blueorangutan package |
|
@harikrishna-patnala 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. |
DaanHoogland
left a comment
There was a problem hiding this comment.
anyLong() is already statically imported, so no need for importing ArgumentMatchers.
...oadbalancer/src/test/java/org/apache/cloudstack/internallbvmmgr/InternalLBVMServiceTest.java
Outdated
Show resolved
Hide resolved
...oadbalancer/src/test/java/org/apache/cloudstack/internallbvmmgr/InternalLBVMServiceTest.java
Outdated
Show resolved
Hide resolved
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14343 |
Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: dahn <daan.hoogland@gmail.com>
|
@blueorangutan package |
|
@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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✖️ debian ✔️ suse15. SL-JID 14364 |
…e#11230) * Added events for snapshots, vmsnapshots, internalLB operations * Update server/src/main/java/com/cloud/resource/ResourceManagerImpl.java Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com> * small fix * Unit test - ArgumentMatchers change Co-authored-by: dahn <daan.hoogland@gmail.com> * Unit test - ArgumentMatchers change Co-authored-by: dahn <daan.hoogland@gmail.com> --------- Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com> Co-authored-by: dahn <daan.hoogland@gmail.com>
Description
This PR adds few fixes/improvements for events for few operations on snapshots, vmsnapshots, internalLB.
This addresses few items in the issue #8771
Types of changes
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?