Skip to content

Remove excessive logs in LogUtils - #7228

Merged
DaanHoogland merged 5 commits into
apache:mainfrom
scclouds:logutils-decrease-log-verbosity
Jun 7, 2023
Merged

Remove excessive logs in LogUtils#7228
DaanHoogland merged 5 commits into
apache:mainfrom
scclouds:logutils-decrease-log-verbosity

Conversation

@SadiJr

@SadiJr SadiJr commented Feb 14, 2023

Copy link
Copy Markdown
Contributor

Description

ACS has one method (LogUtils#logGsonWithoutException) which tries to transform one object to JSON, to write this object in the logs. If this tranformation fails, the message error to decode is written in DEBUG, which in some scenarios can cause a lot of useless messages. This method was refactored, and this message was changed to write only in TRACE.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

It was tested in a local lab:

  1. I performed some basic operations in VMs, like creating new VMs, destroying these VMs, migrating volumes, and so on;
  2. Before, there were a lot of messages error to decode like, which didn't provide enough information to the operators;
  3. This message is no longer displayed in the DEBUG level.

@codecov

codecov Bot commented Feb 14, 2023

Copy link
Copy Markdown

Codecov Report

Merging #7228 (0c8ea59) into main (2f309b5) will increase coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #7228   +/-   ##
=========================================
  Coverage     12.95%   12.95%           
- Complexity     8986     8987    +1     
=========================================
  Files          2728     2728           
  Lines        256647   256647           
  Branches      40024    40024           
=========================================
+ Hits          33256    33258    +2     
+ Misses       219214   219208    -6     
- Partials       4177     4181    +4     

see 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Comment thread utils/src/main/java/com/cloud/utils/LogUtils.java Outdated
Comment thread utils/src/main/java/com/cloud/utils/LogUtils.java
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

25.0% 25.0% Coverage
0.0% 0.0% Duplication

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a 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

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 5629

Comment thread utils/src/main/java/com/cloud/utils/LogUtils.java Outdated
@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-6217)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 40685 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7228-t6217-kvm-centos7.zip
Smoke tests completed. 108 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@RodrigoDLopez RodrigoDLopez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [LL] 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

Copy link
Copy Markdown

Packaging result [LL]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6098

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-6697)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 41912 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr7228-t6697-kvm-centos7.zip
Smoke tests completed. 110 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@DaanHoogland
DaanHoogland merged commit 9cb561e into apache:main Jun 7, 2023
@DaanHoogland DaanHoogland added this to the 4.19.0.0 milestone Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants