Skip to content

Add and improve logs in snapshot scheduling - #6925

Merged
DaanHoogland merged 2 commits into
apache:mainfrom
scclouds:improve-schedule-snapshots-logs
Sep 19, 2023
Merged

Add and improve logs in snapshot scheduling#6925
DaanHoogland merged 2 commits into
apache:mainfrom
scclouds:improve-schedule-snapshots-logs

Conversation

@stephankruggg

Copy link
Copy Markdown
Contributor

Description

This PR adds and improves logs in the snapshot scheduling process in order to facilitate troubleshooting, as current logs are scarce.

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

Feature/Enhancement Scale

  • Major
  • Minor

How Has This Been Tested?

I applied the changes in a local lab and checked if the messages were being correctly logged.

@codecov

codecov Bot commented Nov 28, 2022

Copy link
Copy Markdown

Codecov Report

Merging #6925 (35810b7) into main (adec811) will increase coverage by 0.01%.
The diff coverage is 70.27%.

❗ Current head 35810b7 differs from pull request most recent head a5465cd. Consider uploading reports for the commit a5465cd to get more accurate results

@@             Coverage Diff              @@
##               main    #6925      +/-   ##
============================================
+ Coverage     10.87%   10.89%   +0.01%     
- Complexity     7117     7135      +18     
============================================
  Files          2485     2485              
  Lines        245507   245528      +21     
  Branches      38334    38335       +1     
============================================
+ Hits          26699    26748      +49     
+ Misses       215538   215510      -28     
  Partials       3270     3270              
Impacted Files Coverage Δ
.../cloud/storage/snapshot/SnapshotSchedulerImpl.java 16.51% <70.27%> (+16.51%) ⬆️
.../main/java/com/cloud/storage/SnapshotPolicyVO.java 94.73% <0.00%> (+7.89%) ⬆️
...ain/java/com/cloud/storage/SnapshotScheduleVO.java 32.14% <0.00%> (+32.14%) ⬆️

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

@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 1 Code Smell

59.8% 59.8% Coverage
0.0% 0.0% Duplication

@harikrishna-patnala

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@harikrishna-patnala 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.

Comment thread server/src/main/java/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java Outdated

@harikrishna-patnala harikrishna-patnala left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code LGTM.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 4693

@JoaoJandre JoaoJandre 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

@stephankruggg , i still oppose to unguarded logging with string evaluation in parameters. i have not seen arguments to counter the downside of it yet. So please look at #6973 it implements a uitlity available in log4j2 and other frameworks that will help compromise between our point of views. What do you think?

@GutoVeronezi GutoVeronezi mentioned this pull request Dec 12, 2022
12 tasks
@stephankruggg

Copy link
Copy Markdown
Contributor Author

@stephankruggg , i still oppose to unguarded logging with string evaluation in parameters. i have not seen arguments to counter the downside of it yet. So please look at #6973 it implements a uitlity available in log4j2 and other frameworks that will help compromise between our point of views. What do you think?

Okay, I will take a look at it.

@stephankruggg

stephankruggg commented Dec 30, 2022

Copy link
Copy Markdown
Contributor Author

@DaanHoogland, sorry for the delay. I took a look at your proposal, and as @GutoVeronezi pointed out (#6973 (comment)), we are already working on a Log4j upgrade, so I do not think applying an extra step is the best option.

@yadvr yadvr added this to the 4.19.0.0 milestone Apr 19, 2023
@yadvr

yadvr commented May 23, 2023

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@rohityadavcloud a [SF] 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 6111

@GutoVeronezi

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@GutoVeronezi a [SF] 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 [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 7018

@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-7670)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 42042 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6925-t7670-kvm-centos7.zip
Smoke tests completed. 113 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 c428d3b into apache:main Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants