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

Add new column last_id to the table volumes #9759

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

Conversation

FelipeM525
Copy link
Collaborator

@FelipeM525 FelipeM525 commented Oct 2, 2024

Description

In ACS Once a volume is migrated, it duplicates its row in the database and labels the previous one as removed; however, there is no reference to the deleted row, making it so the operator is unable to track the previous volume effectively. This PR aims to change this by adding a new column to the table volumes called last_id.

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?

This PR was tested by live migrating VM with storage and also by migrating a volume with the VM turned off; in both cases, the new column was populated accordingly.

…it easier to track volumes after their migration
Copy link

codecov bot commented Oct 2, 2024

Codecov Report

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

Project coverage is 15.08%. Comparing base (9df783c) to head (36c88d1).
Report is 13 commits behind head on 4.19.

Files with missing lines Patch % Lines
...hema/src/main/java/com/cloud/storage/VolumeVO.java 0.00% 6 Missing ⚠️
...torage/motion/StorageSystemDataMotionStrategy.java 0.00% 2 Missing ⚠️
...e/cloudstack/storage/volume/VolumeServiceImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.19    #9759      +/-   ##
============================================
- Coverage     15.11%   15.08%   -0.04%     
+ Complexity    11184    11182       -2     
============================================
  Files          5402     5402              
  Lines        473120   473201      +81     
  Branches      58327    58109     -218     
============================================
- Hits          71507    71363     -144     
- Misses       393812   393900      +88     
- Partials       7801     7938     +137     
Flag Coverage Δ
uitests 4.29% <ø> (-0.47%) ⬇️
unittests 15.79% <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.

Copy link
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

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

clgtm

@sureshanaparti
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@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

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

@JoaoJandre JoaoJandre modified the milestones: 4.21.0.0, 4.19.2.0 Oct 4, 2024
@@ -48,6 +48,9 @@ public class VolumeVO implements Volume {
@Column(name = "id")
long id;

@Column(name = "previous_id")
Copy link
Member

Choose a reason for hiding this comment

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

@FelipeM525 thanks for the PR, LGTM. Minor nit - could we call it last_id ? or last_uuid? This is because in the DB schema, there are many last... columns.

@DaanHoogland DaanHoogland changed the title Add new column previous_id to the table volumes Add new column last_id to the table volumes Oct 8, 2024
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.

clgtm

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.

6 participants