slavkap opened a new pull request, #14698:
URL: https://github.com/apache/cloudstack/pull/14698
### 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:
- resize and rollback add the LUKS header allowance for encrypted volumes
- the rollback runs for every failure of the agent command, including a
failed
send or a generic error answer
- the pool capacity is updated only after a successful create/copy/resize,
and
resize uses the size before the change
- a StorPool volume is deleted when its encryption fails
- the KVM agent returns the encryption error instead of losing it, and always
detaches the template snapshot and the resized volume; a failed detach no
longer replaces the result of the resize
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [X] 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)
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [X] Major
- [ ] Minor
- [ ] Trivial
### How Has This Been Tested?
- Unit tests for the driver and the KVM wrappers (resize with/without
encryption, rollback on all failure paths, failed encryption cleanup,
failed detach)
- `test/integration/plugins/storpool/TestEncryptedVolumes.py`: new tests for
live, 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]