Skip to content

Fix: Switch back to CLOUD_DB after purging usage records#9367

Merged
sureshanaparti merged 1 commit into
apache:4.18from
shapeblue:fix-connection-purge-usage-records
Jul 14, 2024
Merged

Fix: Switch back to CLOUD_DB after purging usage records#9367
sureshanaparti merged 1 commit into
apache:4.18from
shapeblue:fix-connection-purge-usage-records

Conversation

@vishesh92

@vishesh92 vishesh92 commented Jul 11, 2024

Copy link
Copy Markdown
Member

Description

Executing removeRawUsageRecords command results in Management server becoming unavailable and random failure of subsequent requests. This PR fixes the issue by switching back to CLOUD_DB after the records have been removed from the database.

Steps to reproduce

Execute cmk removeRawUsageRecords interval=1000. Requests to the management server will start failing after that.

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?

@vishesh92 vishesh92 changed the base branch from main to 4.18 July 11, 2024 10:16
@vishesh92

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

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

@codecov

codecov Bot commented Jul 11, 2024

Copy link
Copy Markdown

Codecov Report

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

Project coverage is 12.26%. Comparing base (beebeed) to head (86c4313).

Files Patch % Lines
...rc/main/java/com/cloud/usage/dao/UsageDaoImpl.java 0.00% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##               4.18    #9367    +/-   ##
==========================================
  Coverage     12.25%   12.26%            
- Complexity     9318     9321     +3     
==========================================
  Files          4699     4699            
  Lines        414601   414603     +2     
  Branches      51421    51693   +272     
==========================================
+ Hits          50829    50842    +13     
+ Misses       357461   357448    -13     
- Partials       6311     6313     +2     
Flag Coverage Δ
unittests 12.26% <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.

@blueorangutan

Copy link
Copy Markdown

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

Comment thread engine/schema/src/main/java/com/cloud/usage/dao/UsageDaoImpl.java Outdated
Comment thread engine/schema/src/main/java/com/cloud/usage/dao/UsageDaoImpl.java Outdated
@yadvr yadvr added this to the 4.19.1.0 milestone Jul 11, 2024
Comment thread engine/schema/src/main/java/com/cloud/usage/dao/UsageDaoImpl.java Outdated

@borisstoyanov borisstoyanov 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 vishesh92 force-pushed the fix-connection-purge-usage-records branch from d64b75a to 86c4313 Compare July 12, 2024 07:23
@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@sureshanaparti 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
Copy Markdown

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

@borisstoyanov

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-10816)

@blueorangutan

Copy link
Copy Markdown

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

Test Result Time (s) Test File
test_02_cancel_host_maintenace_with_migration_jobs Error 227.63 test_host_maintenance.py
test_hostha_kvm_host_fencing Error 184.33 test_hostha_kvm.py

@sureshanaparti sureshanaparti merged commit 22ef081 into apache:4.18 Jul 14, 2024
@DaanHoogland DaanHoogland deleted the fix-connection-purge-usage-records branch July 14, 2024 13:59
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants