Skip to content

Add new column last_id to the table volumes - #9759

Merged
DaanHoogland merged 3 commits into
apache:4.19from
scclouds:track-volume-migration
Nov 28, 2024
Merged

Add new column last_id to the table volumes#9759
DaanHoogland merged 3 commits into
apache:4.19from
scclouds:track-volume-migration

Conversation

@FelipeM525

@FelipeM525FelipeM525 commented Oct 2, 2024

Copy link
Copy Markdown
Contributor

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

codecovBot commented Oct 2, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

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

❗ 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
FlagBASE (9df783c)HEAD (0c86f17)
unittests10
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 
FlagCoverage Δ
uitests4.30% <ø> (-0.47%)⬇️
unittests?

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.

@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

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

@JoaoJandreJoaoJandre modified the milestones: 4.21.0.0, 4.19.2.0Oct 4, 2024
Comment threadengine/schema/src/main/java/com/cloud/storage/VolumeVO.java Outdated
@DaanHooglandDaanHoogland changed the title Add new column previous_id to the table volumesAdd new column last_id to the table volumesOct 8, 2024

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

@yadvr

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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

Copy link
Copy Markdown

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

@yadvr

Copy link
Copy Markdown
Member

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

Comment on lines +73 to +74

CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('volumes','last_id', 'bigint(20) unsigned DEFAULT NULL');

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.

Suggested change
CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('volumes','last_id', 'bigint(20) unsigned DEFAULT NULL');
-- Add last_id to the volumes table
CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('volumes','last_id', 'bigint(20) unsigned DEFAULT NULL');

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.

Looks like maintainers cannot commit/merge suggested changes cc @FelipeM525

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.

Also this should ideally be moved to 4.19.1.0->4.19.2.0 sql path

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.

@blueorangutan

Copy link
Copy Markdown

[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:

TestResultTime (s)Test File
test_provision_certificateError120.43test_certauthority_root.py
test_02_create_iso_with_checksum_sha256Error66.64test_iso.py

…10.sql
Co-authored-by: João Jandre <48719461+JoaoJandre@users.noreply.github.com>
@vladimirpetrov

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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

Copy link
Copy Markdown

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

@vladimirpetrovvladimirpetrov 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 based on manual testing.

@DaanHoogland
DaanHoogland merged commit a8cb7ab into apache:4.19Nov 28, 2024
@weizhouapache

weizhouapache commented Nov 29, 2024

Copy link
Copy Markdown
Member

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

@DaanHoogland

Copy link
Copy Markdown
Contributor

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

@weizhouapache

Copy link
Copy Markdown
Member

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.

@bernardodemarcobernardodemarco mentioned this pull request Dec 2, 2024
14 tasks
DaanHoogland added a commit that referenced this pull request Dec 3, 2024
* 4.20:
UI: Tooltip on the host information card to display the CPU speed in MHz and the memory value in MB (to 3 decimal places) (#9971)
UI: Allow accounts of the `User` type to add other accounts or users to projects through UI (#9927)
enable to create VPC portfowarding rules with source cidr (#7081)
Add new column `last_id` to the table volumes (#9759)
Allow VMWare import via another host (#9787)
Linstor: add support for ISO block devices and direct download (#9792)
get expunged VM data for job result (#9949)
fix section divider display on auth page (#9966)
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Dec 12, 2024
Co-authored-by: João Jandre <48719461+JoaoJandre@users.noreply.github.com>
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Dec 12, 2024
* 4.20:
UI: Tooltip on the host information card to display the CPU speed in MHz and the memory value in MB (to 3 decimal places) (apache#9971)
UI: Allow accounts of the `User` type to add other accounts or users to projects through UI (apache#9927)
enable to create VPC portfowarding rules with source cidr (apache#7081)
Add new column `last_id` to the table volumes (apache#9759)
Allow VMWare import via another host (apache#9787)
Linstor: add support for ISO block devices and direct download (apache#9792)
get expunged VM data for job result (apache#9949)
fix section divider display on auth page (apache#9966)
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.

8 participants

@FelipeM525@sureshanaparti@blueorangutan@yadvr@vladimirpetrov@weizhouapache@DaanHoogland@JoaoJandre