Skip to content

server: fix vm_stats records are not removed if batchsize is 0 - #9818

Merged
yadvr merged 1 commit into
apache:mainfrom
weizhouapache:4.20-fix-vm_stats-cleanup
Oct 18, 2024
Merged

server: fix vm_stats records are not removed if batchsize is 0#9818
yadvr merged 1 commit into
apache:mainfrom
weizhouapache:4.20-fix-vm_stats-cleanup

Conversation

@weizhouapache

Copy link
Copy Markdown
Member

Description

Prior to this change

2024-10-17T10:32:55,455 DEBUG [c.c.v.d.VmStatsDaoImpl] (StatsCollector-5:[ctx-ec4b3698]) (logid:708dd27c) Starting to remove all vm_stats rows older than [Wed Oct 16 22:32:55 UTC 2024].
2024-10-17T10:32:55,456 INFO [c.c.v.d.VmStatsDaoImpl] (StatsCollector-5:[ctx-ec4b3698]) (logid:708dd27c) Removed a total of [0] vm_stats rows older than [Wed Oct 16 22:32:55 UTC 2024].

With this change

2024-10-17T10:41:33,315 DEBUG [c.c.v.d.VmStatsDaoImpl] (StatsCollector-5:[ctx-dd8d7e09]) (logid:338dd659) Starting to remove all vm_stats rows older than [Wed Oct 16 22:41:33 UTC 2024].
2024-10-17T10:43:03,184 INFO [c.c.v.d.VmStatsDaoImpl] (StatsCollector-5:[ctx-dd8d7e09]) (logid:338dd659) Removed a total of [1661329] vm_stats rows older than [Wed Oct 16 22:41:33 UTC 2024].

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
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@codecov

codecovBot commented Oct 17, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 15.78%. Comparing base (20901c7) to head (9a1bdaf).
Report is 1 commits behind head on main.

Files with missing linesPatch %Lines
...java/com/cloud/storage/dao/VolumeStatsDaoImpl.java0.00%1 Missing ⚠️
...src/main/java/com/cloud/vm/dao/VmStatsDaoImpl.java0.00%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #9818 +/- ##
=========================================
Coverage 15.78% 15.78% - Complexity 12564 12565 +1 
=========================================
Files 5627 5627 Lines 492266 492250 -16 Branches 63860 63795 -65 =========================================
+ Hits 77707 77710 +3 + Misses 406084 406066 -18 + Partials 8475 8474 -1 
FlagCoverage Δ
uitests4.04% <ø> (ø)
unittests16.60% <0.00%> (+<0.01%)⬆️

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.

@yadvryadvr 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.

LGTM didn't test it

@weizhouapache
weizhouapache marked this pull request as ready for review October 17, 2024 11:35
@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache 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.

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

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

@vishesh92

Copy link
Copy Markdown
Member

@weizhouapache We need this change in 4.19 since the PRs you mentioned are part of 4.19 branch.

@shwstpprshwstppr 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.

code lgtm

@sureshanapartisureshanaparti 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.

clgtm

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@weizhouapache We need this change in 4.19 since the PRs you mentioned are part of 4.19 branch.

4.19 has similar change introduced in #8740 , it works

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

TestResultTime (s)Test File
test_create_pvlan_networkError0.10test_pvlan.py
test_disable_oobm_ha_state_ineligibleError322.16test_hostha_kvm.py
test_hostha_configure_default_driverError112.52test_hostha_kvm.py
test_hostha_enable_ha_when_host_disconectedError553.63test_hostha_kvm.py
test_hostha_enable_ha_when_host_in_maintenanceError548.49test_hostha_kvm.py
test_hostha_enable_ha_when_host_in_maintenanceError548.49test_hostha_kvm.py
test_hostha_kvm_host_degradedError41.62test_hostha_kvm.py
test_hostha_kvm_host_fencingError37.88test_hostha_kvm.py
test_hostha_kvm_host_recoveringError35.38test_hostha_kvm.py
test_remove_ha_provider_not_possibleError35.32test_hostha_kvm.py

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@yadvr

Copy link
Copy Markdown
Member

host_ha test failures are intermittent in nature. Let's merge this for sake of time & kick test matrix on the health check PR cc @JoaoJandre

@yadvr
yadvr merged commit 019f2c6 into apache:mainOct 18, 2024
@blueorangutan

Copy link
Copy Markdown

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

TestResultTime (s)Test File

dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Oct 24, 2024
Sign up for freeto 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.

7 participants

@weizhouapache@blueorangutan@vishesh92@yadvr@shwstppr@sureshanaparti@JoaoJandre