-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Improve logging to include more identifiable information #9873
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #9873 +/- ##
==========================================
Coverage 16.04% 16.04%
- Complexity 12835 12845 +10
==========================================
Files 5637 5639 +2
Lines 493651 493898 +247
Branches 59874 59883 +9
==========================================
+ Hits 79205 79260 +55
- Misses 405648 405832 +184
- Partials 8798 8806 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
355b1e5 to
6a0dc33
Compare
6a0dc33 to
5672f7f
Compare
|
@blueorangutan package |
|
@vishesh92 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 11508 |
|
@blueorangutan package |
|
@vishesh92 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. |
a0e0e89 to
c84082e
Compare
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11556 |
|
@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. |
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
Outdated
Show resolved
Hide resolved
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
Outdated
Show resolved
Hide resolved
...eio/src/main/java/org/apache/cloudstack/storage/datastore/manager/ScaleIOSDCManagerImpl.java
Outdated
Show resolved
Hide resolved
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11564 |
|
@blueorangutan package |
|
@vishesh92 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. |
.../apache/cloudstack/network/opendaylight/agent/OpenDaylightControllerResourceManagerImpl.java
Outdated
Show resolved
Hide resolved
...n/java/org/apache/cloudstack/storage/datastore/lifecycle/AdaptiveDataStoreLifeCycleImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/ha/AbstractInvestigatorImpl.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan package |
|
@vishesh92 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 Making this change in this PR would be difficult due to the size of the changes. It would be better to tackle this separately once we have reached a consensus in #9132. Also, I have raised this PR against 4.20. There might be some merge conflicts while forward merging 4.19 to 4.20 but those were going to come anyway due to the logger variable rename in 4.20 branch. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 11970 |
|
@blueorangutan test |
|
@vishesh92 a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-12028)
|
kiranchavala
left a comment
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.
LGTM , the logs contains the UUID of the resources during various operations
| Test Case Execution | Result |
|---|---|
| Smoketests | Pass |
| Test powerflex setup functionality | Pass |
| Verify changes are applicable for agent logs | Pass |
| Verify changes are applicable for management logs | Pass |
| Display uuid or name of entity for debugging purposes | Pass |
For example
Before
2025-01-03 09:41:18,961 DEBUG [c.c.v.VirtualMachinePowerStateSyncImpl] (AgentManager-Handler-11:null) (logid:) vm id: 3 - time since last state update(21960ms) has not passed graceful period yet
After
2025-01-03 08:17:42,909 DEBUG [c.c.v.VirtualMachinePowerStateSyncImpl] (AgentManager-Handler-4:null) (logid:) vm: VM instance {"id":6,"instanceName":"i-2-6-VM","type":"User","uuid":"ef5cf0d8-b63b-411c-a88f-94e57a1b6f97"} - time since last state update(50906 ms) has not passed graceful period yet
|
@blueorangutan test keepEnv |
|
@kiranchavala a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-12036)
|
harikrishna-patnala
left a comment
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.
LGTM
* Improve logging to include more identifiable information for kvm plugin * Update logging for scaleio plugin * Improve logging to include more identifiable information for default volume storage plugin * Improve logging to include more identifiable information for agent managers * Improve logging to include more identifiable information for Listeners * Replace ids with objects or uuids * Improve logging to include more identifiable information for engine * Improve logging to include more identifiable information for server * Fixups in engine * Improve logging to include more identifiable information for plugins * Improve logging to include more identifiable information for Cmd classes * Fix toString method for StorageFilterTO.java
PR apache#9873 changed the default implemention of hostConnect on the DefaultHostListener, and Linstor tried to call the none existant default implementation. With the change in the PR a recursion was triggered that triggered a StackOverflow and stopped adding Linstor primary storage.
PR apache#9873 changed the default implementation of hostConnect on the DefaultHostListener, and Linstor tried to call the none existent default implementation. With the change in the PR a recursion was triggered that triggered a StackOverflow and stopped adding Linstor primary storage.
Description
Github generated description
This pull request introduces several changes across multiple files to enhance logging, add UUID and name properties, and improve the toString methods for better debugging and clarity. Here are the most important changes:
Enhancements to
Agentclass:uuidandnameproperties to theAgentclass and updated the constructor to initialize these properties from the shell. [1] [2]uuidandnamein various methods such asprocessStartupAnswerandprocessReadyCommand. [1] [2] [3]uuidandname, including persistence logic.Updates to
LoadBalancerTOand related classes:uuidproperty toCounterTO,ConditionTO, andAutoScalePolicyTOclasses, along with corresponding getter methods. [1] [2] [3] [4] [5] [6]Improvements to logging and exception handling:
UpdateHostCmdandCreateSnapshotFromVMSnapshotCmdto include more detailed information. [1] [2] [3] [4]RemoveVpnUserCmdto use theAccountobject directly in method calls and logging.Method signature changes:
Ipv6Service,RemoteAccessVpnService, andGlobalLoadBalancingRulesServiceto use more appropriate parameter types. [1] [2] [3]Improved
toStringmethods:toStringmethods inNetworkProfile,NicProfile, andUnmanagedInstanceTOclasses for better debugging output. [1] [2] [3]This PR updates the logging for some modules to ensure that we log more details to easily identify resources from the logs.
e.g. We use id at a lot of places in the logs and it makes it difficult to know about the resource without querying the database. This PR makes changes to include uuid or any other relevant fields to the objects in the logs so that the user can easily identify the resource.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?