cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Add new column `last_id` to the table volumes

Open FelipeM525 opened this issue 1 year ago • 10 comments

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)
  • [x] 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
  • [x] 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.

FelipeM525 avatar Oct 02 '24 19:10 FelipeM525

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 4.30%. Comparing base (9df783c) to head (0c86f17). Report is 57 commits behind head on 4.19.

:exclamation: There is a different number of reports uploaded between BASE (9df783c) and HEAD (0c86f17). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (9df783c) HEAD (0c86f17)
unittests 1 0
Additional details and impacted files
@@             Coverage Diff              @@
##               4.19   #9759       +/-   ##
============================================
- Coverage     15.11%   4.30%   -10.81%     
============================================
  Files          5402     366     -5036     
  Lines        473120   29541   -443579     
  Branches      58327    5172    -53155     
============================================
- Hits          71507    1272    -70235     
+ Misses       393812   28125   -365687     
+ Partials       7801     144     -7657     
Flag Coverage Δ
uitests 4.30% <ø> (-0.47%) :arrow_down:
unittests ?

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 02 '24 19:10 codecov[bot]

@blueorangutan package

sureshanaparti avatar Oct 03 '24 12:10 sureshanaparti

@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 avatar Oct 03 '24 12:10 blueorangutan

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

blueorangutan avatar Oct 03 '24 13:10 blueorangutan

@blueorangutan package

rohityadavcloud avatar Oct 16 '24 05:10 rohityadavcloud

@rohityadavcloud 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 avatar Oct 16 '24 05:10 blueorangutan

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

blueorangutan avatar Oct 16 '24 06:10 blueorangutan

@blueorangutan test

rohityadavcloud avatar Oct 17 '24 09:10 rohityadavcloud

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

blueorangutan avatar Oct 17 '24 09:10 blueorangutan

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

Test Result Time (s) Test File
test_provision_certificate Error 120.43 test_certauthority_root.py
test_02_create_iso_with_checksum_sha256 Error 66.64 test_iso.py

blueorangutan avatar Oct 18 '24 01:10 blueorangutan

@blueorangutan package

vladimirpetrov avatar Nov 13 '24 22:11 vladimirpetrov

@vladimirpetrov 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 avatar Nov 13 '24 22:11 blueorangutan

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

blueorangutan avatar Nov 13 '24 23:11 blueorangutan

this will bring troubles for users who use 4.20.0, because 4.20.1 does not have the db changes for them

weizhouapache avatar Nov 29 '24 15:11 weizhouapache

ok, so we need to revert this, or add a fix in 4.19.2 to 4.20.1. thanks for the headsup @weizhouapache

DaanHoogland avatar Nov 29 '24 16:11 DaanHoogland

ok, so we need to revert this, or add a fix in 4.19.2 to 4.20.1. thanks for the headsup @weizhouapache

maybe add to both schema-41910to41920.sql (4.19.1 to 4.19.2 upgrade) and schema-42000to42010.sql (for 4.20.0 to 4.20.1 upgrade) anyway, schema-41900to41910.sql is not the right place to add SQL changes as 4.19.1.0 has been released.

weizhouapache avatar Nov 29 '24 19:11 weizhouapache