OpenStack Block Storage (Cinder)
Go to file
haixin cf1c525296 [rbd] Fix create encrypted volume from snapshot
Usually the source volume would be the same size or smaller
than the destination volume and they must share the same
volume-type. In particular, when the destination volume is
same size as the source volume, creating an encrypted volume
from a snapshot of an encrypted volume truncates the data in
the new volume.

In order to fix this the RBD workflow would be something
like this:
A source luks volume would be 1026M, we write some data
and create a snap from it. We like to create a new luks
volume from a snapshot so the create_volume_from_snapshot()
method performs a RBD clone first and then a resize if needed.

In addition the _clone() method creates a clone
(copy-on-write child) of the parent snapshot. Object size
will be identical to that of the parent image unless specified
(we don't in cinder) so size will be the same as the parent
snapshot.

If the desired size of the destination luks volume is 1G the
create_volume_from_snapshot() won't perform any resize and
will be 1026M as the parent. This solves bug #1922408 because
we don't force it to resize and because of that we don't
truncate the data anymore.

The second case scenario is when we would like to increase
the size of the destination volume. As far as I can tell this
won't face the encryption header problem but we still need to
calculate the difference size to provide the size that the
user is expecting.

That's why the fix proposed calculate the new_size based on:
size difference = desired size - size of source volume
new size = current size + size difference

Closes-Bug: #1922408
Co-Authored-By: Sofia Enriquez <lsofia.enriquez@gmail.com>
Change-Id: I220b5e3b01d115262a8b1dd45758f0531aea0edf
2021-07-29 16:31:21 +00:00
api-ref/source Merge "api-ref: Don't list HTTP 500 for backup create" 2021-03-19 22:09:11 +00:00
cinder [rbd] Fix create encrypted volume from snapshot 2021-07-29 16:31:21 +00:00
contrib/block-box Add note that block-box is not supported 2020-01-10 08:37:54 -06:00
doc Add quota utils to cinder-manage 2021-03-30 16:20:35 +02:00
etc/cinder Delete TSM Backup driver 2020-11-03 18:53:39 +02:00
playbooks zuul: collect cinderlib logs from tempest node(s) only 2020-07-16 14:42:29 +02:00
rally-jobs Small doc updates: canonical URLs, rally doc, etc 2019-06-04 17:57:16 +02:00
releasenotes [rbd] Fix create encrypted volume from snapshot 2021-07-29 16:31:21 +00:00
tools Merge "tox mypy: Call mypywrap.sh directly" 2021-02-19 21:26:28 +00:00
.coveragerc Update .coveragerc after the removal of openstack directory 2016-10-17 19:09:37 +05:30
.gitignore Add mypy tox env 2020-10-14 08:24:13 -04:00
.gitreview OpenDev Migration Patch 2019-04-19 19:26:48 +00:00
.pylintrc Pylint: Filter out cinder.objects and requests E1101 2019-02-21 13:28:44 -05:00
.stestr.conf Add .stestr.conf configuration 2017-10-10 00:46:42 +00:00
.zuul.yaml Merge "add openstack-python3-wallaby-jobs-arm64 job" 2021-03-20 07:49:56 +00:00
CONTRIBUTING.rst Ussuri contrib docs community goal 2020-03-05 14:11:48 -05:00
HACKING.rst Update HACKING document to match current checks 2020-04-17 15:09:13 +00:00
LICENSE Initial fork out of Nova. 2012-05-03 10:48:26 -07:00
README.rst Merge "Refactor README links" 2020-01-22 11:44:36 +00:00
bindep.txt bindep: Track qemu-img dependency 2020-08-19 15:00:35 +00:00
driver-requirements.txt Add ceph iscsi volume driver 2021-01-28 08:22:13 -05:00
lower-constraints.txt Use os-brick 4.3.1 2021-03-29 12:05:49 -04:00
mypy-files.txt mypy: annotate volume manager 2021-02-10 12:27:47 -05:00
reno.yaml Reno: Use customized template 2020-10-06 13:28:45 +02:00
requirements.txt Use os-brick 4.3.1 2021-03-29 12:05:49 -04:00
setup.cfg Add ceph iscsi volume driver 2021-01-28 08:22:13 -05:00
setup.py Cleanup py27 support 2020-04-17 14:47:10 +02:00
test-requirements.txt Use os-brick 4.3.0 2021-03-25 13:15:43 -04:00
tox.ini Changed whitelist to allowlist in tox 2021-03-17 11:08:56 +05:30

README.rst

OpenStack Cinder

image

OpenStack Cinder is a storage service for an open cloud computing service.

You can learn more about Cinder at:

Getting Started

If you'd like to run from the master branch, you can clone the git repo:

git clone https://opendev.org/openstack/cinder

If you'd like to contribute, please see the information in CONTRIBUTING.rst

You can raise bugs on Launchpad

Python client

Python Cinderclient