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

Allow counters to be created with same name, provider and source as a deleted one #10223

Open
wants to merge 6 commits into
base: 4.19
Choose a base branch
from

Conversation

Pearl1594
Copy link
Contributor

Description

This PR fixes: #10043

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

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?

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

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

Project coverage is 15.16%. Comparing base (641a606) to head (6b5ece3).
Report is 1 commits behind head on 4.19.

Files with missing lines Patch % Lines
.../api/command/admin/autoscale/CreateCounterCmd.java 0.00% 5 Missing ⚠️
...ava/com/cloud/network/as/AutoScaleManagerImpl.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.19   #10223   +/-   ##
=========================================
  Coverage     15.16%   15.16%           
- Complexity    11296    11299    +3     
=========================================
  Files          5408     5408           
  Lines        473891   473895    +4     
  Branches      57838    57838           
=========================================
+ Hits          71846    71851    +5     
  Misses       394013   394013           
+ Partials       8032     8031    -1     
Flag Coverage Δ
uitests 4.29% <ø> (ø)
unittests 15.88% <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.

@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@Pearl1594 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]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12137

@rohityadavcloud
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

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

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

one comment,

Also the issue reported that deleteCounter doesn't work. Is that genuine?

Comment on lines 25 to 26
ALTER TABLE `cloud`.`counter` DROP KEY `uc_counter__provider__source__value`;
CALL `cloud`.`IDEMPOTENT_ADD_UNIQUE_KEY`('cloud.counter', 'uc_counter__provider__source__value_removed', '(provider, source, value, removed)');
Copy link
Contributor

Choose a reason for hiding this comment

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

how will we deal with this in upgrade paths that bypass this one?
I mean can we add an if-exists construct and copy it to future upgrades?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why would this be bypassed? Wouldn't we have a schema file for 4.19.2 -> 4.20? And since you brought it up, since this involves a DB change - should this go into the next major release?

Copy link
Member

Choose a reason for hiding this comment

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

If I understand correctly, what Daan meant is the upgrade from a version which does not have this change , for example 4.20.0.0 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah.. got it.. I completely forgot 🤦

@blueorangutan
Copy link

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

Test Result Time (s) Test File

@@ -22,5 +22,20 @@
-- Add last_id to the volumes table
CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.volumes', 'last_id', 'bigint(20) unsigned DEFAULT NULL');

ALTER TABLE `cloud`.`counter` DROP KEY `uc_counter__provider__source__value`;
CALL `cloud`.`IDEMPOTENT_ADD_UNIQUE_KEY`('cloud.counter', 'uc_counter__provider__source__value_removed', '(provider, source, value, removed)');
SELECT
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

good call @weizhouapache that will help with a lot of these parallel upgrade issues.

Copy link

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

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.

5 participants