Skip to content

Update volume's passphrase to null if diskOffering doesn't support encryption#8904

Merged
yadvr merged 1 commit into
apache:4.19from
shapeblue:fix-encryption-on-recreate
Apr 29, 2024
Merged

Update volume's passphrase to null if diskOffering doesn't support encryption#8904
yadvr merged 1 commit into
apache:4.19from
shapeblue:fix-encryption-on-recreate

Conversation

@vishesh92

@vishesh92 vishesh92 commented Apr 12, 2024

Copy link
Copy Markdown
Member

Description

This PR updates the volume's passphrase to null if diskOffering doesn't support encryption

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

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?

How did you try to break this feature and the system with this change?

@vishesh92

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@vishesh92 vishesh92 force-pushed the fix-encryption-on-recreate branch from ddb3351 to fc979ae Compare April 15, 2024 05:37
@vishesh92 vishesh92 changed the base branch from main to 4.19 April 15, 2024 05:37
@vishesh92 vishesh92 force-pushed the fix-encryption-on-recreate branch from fc979ae to b8f60d2 Compare April 15, 2024 05:44
@apache apache deleted a comment from blueorangutan Apr 15, 2024
@vishesh92

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

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

code lgtm

@codecov-commenter

codecov-commenter commented Apr 15, 2024

Copy link
Copy Markdown

Codecov Report

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

Project coverage is 18.32%. Comparing base (c25264b) to head (b8f60d2).
Report is 37 commits behind head on 4.19.

Files Patch % Lines
...stack/engine/orchestration/VolumeOrchestrator.java 0.00% 3 Missing ⚠️
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java 0.00% 3 Missing ⚠️
...e/cloudstack/storage/volume/VolumeServiceImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##               4.19    #8904       +/-   ##
=============================================
- Coverage     30.98%   18.32%   -12.66%     
+ Complexity    34408    16841    -17567     
=============================================
  Files          5359     4863      -496     
  Lines        377017   326034    -50983     
  Branches      54856    45840     -9016     
=============================================
- Hits         116804    59761    -57043     
- Misses       244852   257783    +12931     
+ Partials      15361     8490     -6871     
Flag Coverage Δ
simulator-marvin-tests 18.32% <0.00%> (-6.49%) ⬇️
uitests ?
unit-tests ?

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.

@blueorangutan

Copy link
Copy Markdown

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

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

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

Test Result Time (s) Test File
test_01_events_resource Error 291.89 test_events_resource.py
test_01_events_resource Error 291.90 test_events_resource.py
test_04_deploy_vm_for_other_user_and_test_vm_operations Failure 86.01 test_network_permissions.py
ContextSuite context=TestNetworkPermissions>:teardown Error 1.41 test_network_permissions.py

@yadvr yadvr requested a review from borisstoyanov April 24, 2024 07:05
@yadvr yadvr added this to the 4.19.1.0 milestone Apr 24, 2024
@vishesh92 vishesh92 marked this pull request as ready for review April 24, 2024 07:45

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

@borisstoyanov borisstoyanov 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, it now stores NULL for volumes with no encryption

MariaDB [cloud]> select disk_offering_id,passphrase_id from volumes;
+------------------+---------------+
| disk_offering_id | passphrase_id |
+------------------+---------------+
|                9 |          NULL |
|               13 |          NULL |
|                1 |          NULL |
|                3 |          NULL |
+------------------+---------------+
4 rows in set (0.00 sec)

MariaDB [cloud]> select name,encrypt from disk_offering where id in (1,3);
+----------------+---------+
| name           | encrypt |
+----------------+---------+
| Small Instance |       0 |
| Small          |       0 |
+----------------+---------+
2 rows in set (0.00 sec)

@yadvr yadvr merged commit 80a8b80 into apache:4.19 Apr 29, 2024
@yadvr yadvr deleted the fix-encryption-on-recreate branch April 29, 2024 06:48
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

8 participants