Skip to content
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

Enhancement in the accuracy of the logs regarding the capacity, usage, and threshold of secondary storages #9043

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lucas-a-martins
Copy link
Contributor

Description

The capacity and usage values from secondary storage shown in the logs lack accuracy due to the absence of decimal places, creating cases where the value is rounded down even if it is close to the higher number (e.g., 49.90 GB being shown as 49GB).

This pull request addresses this issue by adding two decimal places to capacity and usage values. Additionally, in order to standardize, the threshold value, which was more accurate than necessary, was reduced to only two decimal places.

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)
  • build/CI

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

How Has This Been Tested?

I tested by registering a template and verifying the logs.

Before changes:

2024-05-03T19:33:48,616 DEBUG [c.c.s.StatsCollector] (secstorage-1:[ctx-391b7254]) (logid:bcdb0d20) Verifying image storage [1]. Capacity: total=[58 GB], used=[4 GB], threshold=[89.99999761581421%].

After changes:

2024-05-03T18:12:37,198 DEBUG [c.c.s.StatsCollector] (secstorage-1:[ctx-e10bb7c0]) (logid:f8f066d7) Verifying image storage [1]. Capacity: total=[58.80 GB], used=[4.10 GB], threshold=[90.00%].

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 4.26%. Comparing base (d5241d3) to head (6e651cc).
Report is 11 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #9043       +/-   ##
============================================
- Coverage     15.28%   4.26%   -11.02%     
============================================
  Files          5425     363     -5062     
  Lines        474005   29565   -444440     
  Branches      61507    5190    -56317     
============================================
- Hits          72447    1262    -71185     
+ Misses       393516   28160   -365356     
+ Partials       8042     143     -7899     
Flag Coverage Δ
uitests 4.26% <ø> (-0.01%) ⬇️
unittests ?

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@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
Copy link

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

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.

None yet

4 participants