cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Refactor cloud-agent module logs for Log4j2

Open KlausDornsbach opened this issue 11 months ago • 2 comments

Description

With the new version of Log4j there is some space for improving log readability using the new features. This PR refactors the logs from the cloud-agent module.

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)
  • [X] Cleanup (Code refactoring and cleanup, that may add test cases)
  • [ ] build/CI

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • [ ] Major
  • [X] Minor

Bug Severity

  • [ ] BLOCKER
  • [ ] Critical
  • [ ] Major
  • [ ] Minor
  • [ ] Trivial

How Has This Been Tested?

It was tested in a local lab:

  • I have done some operations on cloudstack to induce the generation of the logs
  • No problems or changes to the log output were found

KlausDornsbach avatar Feb 27 '24 21:02 KlausDornsbach

Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) Here are some useful points:

  • In case of a new feature add useful documentation (raise doc PR at https://github.com/apache/cloudstack-documentation)
  • Be patient and persistent. It might take some time to get a review or get the final approval from the committers.
  • Pay attention to the quality of your code, ensure tests are passing and your PR doesn't have conflicts.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Issues, Mailing list and Slack.
  • Be sure to read the CloudStack Coding Conventions. Apache CloudStack is a community-driven project and together we are making it better 🚀. In case of doubts contact the developers at: Mailing List: [email protected] (https://cloudstack.apache.org/mailing-lists.html) Slack: https://apachecloudstack.slack.com/

boring-cyborg[bot] avatar Feb 27 '24 21:02 boring-cyborg[bot]

Codecov Report

Attention: Patch coverage is 6.09756% with 77 lines in your changes are missing coverage. Please review.

Project coverage is 31.06%. Comparing base (e44c17e) to head (396034a).

Files Patch % Lines
agent/src/main/java/com/cloud/agent/Agent.java 0.00% 49 Missing :warning:
...nt/resource/consoleproxy/ConsoleProxyResource.java 0.00% 17 Missing :warning:
...gent/src/main/java/com/cloud/agent/AgentShell.java 16.66% 5 Missing :warning:
...va/com/cloud/agent/dao/impl/PropertiesStorage.java 0.00% 3 Missing :warning:
...rc/main/java/com/cloud/agent/mockvm/MockVmMgr.java 0.00% 3 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8714      +/-   ##
============================================
+ Coverage     30.93%   31.06%   +0.12%     
- Complexity    33753    33909     +156     
============================================
  Files          5404     5404              
  Lines        380309   380289      -20     
  Branches      55507    55489      -18     
============================================
+ Hits         117658   118122     +464     
+ Misses       247041   246512     -529     
- Partials      15610    15655      +45     
Flag Coverage Δ
simulator-marvin-tests 24.79% <0.00%> (+0.23%) :arrow_up:
uitests 4.34% <ø> (ø)
unit-tests 16.88% <6.09%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 27 '24 21:02 codecov[bot]

@blueorangutan package

DaanHoogland avatar Feb 28 '24 08:02 DaanHoogland

@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 avatar Feb 28 '24 08:02 blueorangutan

Packaging result [SF]: ✖️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8808

blueorangutan avatar Feb 28 '24 09:02 blueorangutan

@blueorangutan package

DaanHoogland avatar Mar 04 '24 09:03 DaanHoogland

@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 avatar Mar 04 '24 09:03 blueorangutan

Packaging result [SF]: ✖️ el7 ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 8843

blueorangutan avatar Mar 04 '24 09:03 blueorangutan

@blueorangutan package

JoaoJandre avatar Mar 20 '24 12:03 JoaoJandre

@JoaoJandre 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 avatar Mar 20 '24 12:03 blueorangutan

Packaging result [SF]: ✖️ el7 ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 8982

blueorangutan avatar Mar 20 '24 13:03 blueorangutan

@KlausDornsbach

13:59:26 [ERROR] /jenkins/workspace/acs-centos7-pkg-builder/dist/rpmbuild/BUILD/cloudstack-4.20.0.0-SNAPSHOT/server/src/main/java/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java:[420,12] error: cannot find symbol
13:59:26   symbol:   variable s_logger
13:59:26   location: class SnapshotSchedulerImpl

I can not find the reference to s_logger in SnapshotSchedulerImpl in main, so maybe rebase on main would solve the issue.

DaanHoogland avatar Mar 25 '24 10:03 DaanHoogland

Thanks for the heads up @DaanHoogland, hopefully issues are solved now.

KlausDornsbach avatar Mar 25 '24 19:03 KlausDornsbach

@blueorangutan package

JoaoJandre avatar Mar 26 '24 13:03 JoaoJandre

@JoaoJandre 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 avatar Mar 26 '24 13:03 blueorangutan

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

blueorangutan avatar Mar 26 '24 14:03 blueorangutan

@blueorangutan test alma9 kvm-alma9

DaanHoogland avatar Mar 29 '24 13:03 DaanHoogland

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

blueorangutan avatar Mar 29 '24 13:03 blueorangutan

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

Test Result Time (s) Test File

blueorangutan avatar Mar 30 '24 03:03 blueorangutan

Merging based on approvals and CI result

JoaoJandre avatar Apr 01 '24 11:04 JoaoJandre

Awesome work, congrats on your first merged pull request!

boring-cyborg[bot] avatar Apr 01 '24 11:04 boring-cyborg[bot]