Skip to content

Commit

Permalink
Adds qemu-img commit patch for Cinder with v3 Kernels
Browse files Browse the repository at this point in the history
  • Loading branch information
casusbelli committed Nov 30, 2018
1 parent d0bd3e3 commit 4c6b0b4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ This patch is part of the upstream code fore releases Pike and newer.

Backport of the upstream changes for [overlay volumes](https://review.openstack.org/#/c/507050), the [volume_from_snapshot_cache](https://review.openstack.org/#/c/502974/9) and some [general volume creation optimizations](https://review.openstack.org/#/c/500782/) for Cinder.

## qemu-img_commit_patch
A simple Cinder patch for setups encountering qemu-img commit crashes during snapshot deletion with v3 Kernels.

## xattr-removal_patch

Backports of performance optimizations that remove the usage of xattr from the Nova driver and mount Quobyte volumes without xattr support, in order to improve iops.
Expand Down
12 changes: 12 additions & 0 deletions qemu-img_commit_patch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

## qemu-img_commit_patch for old v3 kernels

Backports a very simple patch for Cinder setups that use qemu-img version 2.10+ with v3.10 Kernels. In case a setup hits issues with qemu-img crashing in a qemu-img commit call during snapshot deletion this patch provides a simple fix.
The patch has been added upstream with [change #6200926](https://review.openstack.org/#/c/620926/) and will be ported back to the previous three releases. Older releases are provided with this patch via this repository.


### Installation

This patch can be applied by navigating to the Cinder project source root directory and running:

patch -p1 < /path/to/patchfile
13 changes: 13 additions & 0 deletions qemu-img_commit_patch/qemu-img_commit_patch_Ocata.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/cinder/volume/drivers/remotefs.py b/cinder/volume/drivers/remotefs.py
index 6f07cb90c..54f15f2ca 100644
--- a/cinder/volume/drivers/remotefs.py
+++ b/cinder/volume/drivers/remotefs.py
@@ -744,7 +744,7 @@ class RemoteFSSnapDriverBase(RemoteFSDriver):
# NFS snapshots
# It needs to run as root for volumes attached to instances, but
# does not when in secure mode.
- self._execute('qemu-img', 'commit', path,
+ self._execute('qemu-img', 'commit', '-d', path,
run_as_root=self._execute_as_root)
self._delete(path)

0 comments on commit 4c6b0b4

Please sign in to comment.