Repository navigation
Conversation
The StorPool volume of an encrypted volume is created 2 MiB bigger than the requested size for the LUKS header, but resize and its rollback set it to the bare CloudStack size, so the guest lost the header space. - add the LUKS header allowance on resize and on rollback - always roll back when the agent fails or can not be reached - update the pool capacity only after a successful operation - delete the StorPool volume when encryption fails and return the encryption error from the agent - detach the template snapshot and the volume even on failures - add unit tests and smoke tests for live, offline and ROOT resize, and clean up all objects created by the smoke tests Fixes apache#14695
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 4.22 #14698 +/- ##
============================================
+ Coverage 18.32% 18.36% +0.04%
- Complexity 16644 16687 +43
============================================
Files 5939 5939
Lines 537787 537816 +29
Branches 65932 65933 +1
============================================
+ Hits 98544 98773 +229
+ Misses 428033 427812 -221
- Partials 11210 11231 +21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #14695.
When an encrypted volume is created on StorPool, its StorPool volume is 2 MiB
bigger than the requested size to hold the LUKS header. Resize (and the
rollback after a failed resize) set the StorPool volume to the bare CloudStack
size, so after a resize the guest saw 2 MiB less than requested.
Changes in the StorPool plug-in:
send or a generic error answer
resize uses the size before the change
detaches the template snapshot and the resized volume; a failed detach no
longer replaces the result of the resize
Types of changes
Bug Severity
How Has This Been Tested?
encryption, rollback on all failure paths, failed encryption cleanup,
failed detach)
test/integration/plugins/storpool/TestEncryptedVolumes.py: new tests forlive, offline and ROOT volume resize of encrypted volumes, which check both
the StorPool volume size and the size seen in the guest. The ROOT disk size
now follows the template size, test_05 checks that the snapshot is backed up
to secondary, and all created objects are cleaned up even when a test fails.