OpenStack Block Storage (Cinder)
Go to file
Gorka Eguileor 25eb0a7d76 NFS: Update connection info on online snap create
The NFS snapshot creation for an attached volume requires interaction
between Nova and Cinder, and a new qcow2 file is used after the
attachment completes.

This means that the connection properties stored in the Attachment is no
longer valid, as it is pointing to the old qcow2 file, so if Nova tries
to use that attachment it will start writing on the old qcow2 file.

A flow showing this issue is:

- Attach NFS volume
- Create snapshot
- Hard reboot

After that the VM will start using the base image, breaking the qcow2
chain.

If we delete the snapshot in the meantime, then the VM will fail to
reboot.

This patch fixes this inconsistency by updating the connection info
field inside the remotefs driver.

We usually prefer that drivers don't to touch the DB, directly or
indirectly (using OVOs), but in this case we are using OVOs methods
instead of the usual model update on the volume manager because there
are cases in the driver where a snapshot is created (cloning via
snapshot) and we have to update the attachment without the manager, as
it is unaware that a temporary snapshot is being created.

Besides that main reason there are other less critical reasons to do the
attachment update in the driver:

- Smaller code change
- Easier to backport
- Limit change impact on other areas (better for backport)
- The snapshot_create model update code in the manager does not support
  updating attachments.
- There are cases in the cinder volume manager where the model update
  values returned by snapshot_create are not being applied.

Snapshot deletion belonging to in-use volumes are not affected by this
issue because we only do block commit when the snapshot file we are
deleting is not the active file.  In _delete_snapshot_online:

        if utils.paths_normcase_equal(info['active_file'],
                                      info['snapshot_file']):

Closes-Bug: #1860913
Change-Id: I62fcef3169dcb9f4363a5344af4b2711edfef632
2021-07-07 16:21:26 +02:00
api-ref/source Merge "Fix: Schema validation for attachment create API" 2021-06-17 19:21:57 +00:00
cinder NFS: Update connection info on online snap create 2021-07-07 16:21:26 +02:00
contrib/block-box Add note that block-box is not supported 2020-01-10 08:37:54 -06:00
doc Merge "PowerMax Docs - Corrections to QoS section" 2021-06-18 20:57:56 +00: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 NFS: Update connection info on online snap create 2021-07-07 16:21:26 +02: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: Fix migration E1120 no-value-for-parameter 2021-04-16 13:05:21 +02:00
.stestr.conf Add .stestr.conf configuration 2017-10-10 00:46:42 +00:00
.zuul.yaml Fix functional jobs 2021-05-25 16:55:05 +02:00
bindep.txt bindep: Track qemu-img dependency 2020-08-19 15:00:35 +00:00
CONTRIBUTING.rst Ussuri contrib docs community goal 2020-03-05 14:11:48 -05:00
driver-requirements.txt [Pure Storage] Fix minimum SDK version required 2021-06-28 18:40:25 -04: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
lower-constraints.txt [Pure Storage] Fix minimum SDK version required 2021-06-28 18:40:25 -04:00
mypy-files.txt mypy: annotate volume_utils / utils / exc 2021-04-30 10:41:30 -04:00
README.rst Merge "Refactor README links" 2020-01-22 11:44:36 +00:00
reno.yaml Update release note info 2021-04-16 11:11:41 -04:00
requirements.txt Use os-brick 4.3.1 2021-03-29 12:05:49 -04:00
setup.cfg [Pure Storage] Fix minimum SDK version required 2021-06-28 18:40:25 -04: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 Update to pylint 2.7.4 2021-04-07 10:51:16 -04:00

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