Skip to content

Add new column last_id to the table volumes #9759

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

Merged
merged 3 commits into from
Nov 28, 2024

Conversation

FelipeM525
Copy link
Contributor

@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

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
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%) ⬇️
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.

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

@rohityadavcloud
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@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

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

@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

Comment on lines 73 to 74

CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('volumes','last_id', 'bigint(20) unsigned DEFAULT NULL');
Copy link
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
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
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
Contributor

Choose a reason for hiding this comment

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

@blueorangutan
Copy link

[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

@vladimirpetrov
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@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

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

Copy link
Contributor

@vladimirpetrov vladimirpetrov left a comment

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.19 Nov 28, 2024
23 of 26 checks passed
@weizhouapache
Copy link
Member

weizhouapache commented Nov 29, 2024

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

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

8 participants