-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Added events for snapshots, vmsnapshots, internalLB operations #11230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.19
Are you sure you want to change the base?
Added events for snapshots, vmsnapshots, internalLB operations #11230
Conversation
Codecov ReportAttention: 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.apache.cloudstack.context.CallContext; | ||
import org.apache.cloudstack.network.lb.InternalLoadBalancerVMService; | ||
import org.junit.After; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.mockito.BDDMockito; | ||
import org.mockito.Matchers; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import 'org.mockito.Matchers' is deprecated. Use 'org.mockito.ArgumentMatchers' instead, which is already imported.
import org.mockito.Matchers; |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@harikrishna-patnala , does this make sense?
it requires line 116 to have a simple adjustment as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done @DaanHoogland
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
@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 |
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?