diff --git a/full_quobyte_patch/Ocata/full_quobyte_ocata_nova.patch b/full_quobyte_patch/Ocata/full_quobyte_ocata_nova.patch index 68c6032..97b702a 100644 --- a/full_quobyte_patch/Ocata/full_quobyte_ocata_nova.patch +++ b/full_quobyte_patch/Ocata/full_quobyte_ocata_nova.patch @@ -1,22 +1,3 @@ -diff --git nova/virt/libvirt/imagebackend.py nova/virt/libvirt/imagebackend.py -index 8dd227e..eaf5c81 100644 ---- nova/virt/libvirt/imagebackend.py -+++ nova/virt/libvirt/imagebackend.py -@@ -232,9 +232,11 @@ class Image(object): - if os.path.exists(base) and size > self.get_disk_size(base): - self.resize_image(size) - -- if (self.preallocate and self._can_fallocate() and -- os.access(self.path, os.W_OK)): -- utils.execute('fallocate', '-n', '-l', size, self.path) -+ if (self.preallocate and os.access(self.path, os.W_OK)): -+ LOG.debug('Truncating new image at %(path)s to virtual size ' -+ '(patched for Quobyte).', -+ {'path': self.path}) -+ utils.execute('truncate', '-s', size, self.path) - - def _can_fallocate(self): - """Check once per class, whether fallocate(1) is available, diff --git nova/virt/libvirt/volume/quobyte.py nova/virt/libvirt/volume/quobyte.py index 284a084..f36aacb 100644 --- nova/virt/libvirt/volume/quobyte.py diff --git a/full_quobyte_patch/Ocata/full_quobyte_ocata_nova_full_source_tree.patch b/full_quobyte_patch/Ocata/full_quobyte_ocata_nova_full_source_tree.patch index 2f387a9..2b65565 100644 --- a/full_quobyte_patch/Ocata/full_quobyte_ocata_nova_full_source_tree.patch +++ b/full_quobyte_patch/Ocata/full_quobyte_ocata_nova_full_source_tree.patch @@ -1,19 +1,3 @@ -diff --git nova/tests/unit/virt/libvirt/test_imagebackend.py nova/tests/unit/virt/libvirt/test_imagebackend.py -index b3cc277..2c6dff9 100644 ---- nova/tests/unit/virt/libvirt/test_imagebackend.py -+++ nova/tests/unit/virt/libvirt/test_imagebackend.py -@@ -120,9 +120,8 @@ class _ImageTestCase(object): - image.cache(fake_fetch, self.TEMPLATE_PATH, self.SIZE) - - self.assertEqual(fake_processutils.fake_execute_get_log(), -- ['fallocate -l 1 %s.fallocate_test' % self.PATH, -- 'fallocate -n -l %s %s' % (self.SIZE, self.PATH), -- 'fallocate -n -l %s %s' % (self.SIZE, self.PATH)]) -+ ['truncate -s %s %s' % (self.SIZE, self.PATH), -+ 'truncate -s %s %s' % (self.SIZE, self.PATH)]) - - def test_prealloc_image_without_write_access(self): - CONF.set_override('preallocate_images', 'space') diff --git nova/tests/unit/virt/libvirt/volume/test_quobyte.py nova/tests/unit/virt/libvirt/volume/test_quobyte.py index a43a79a..7f867fa 100644 --- nova/tests/unit/virt/libvirt/volume/test_quobyte.py diff --git a/full_quobyte_patch/README.md b/full_quobyte_patch/README.md index 39f6cb7..b41b4c8 100644 --- a/full_quobyte_patch/README.md +++ b/full_quobyte_patch/README.md @@ -15,7 +15,6 @@ When complete these patches contain all relevant fixes and changes for the given - Fixes bug [1530860](https://bugs.launchpad.net/nova/+bug/1530860) with patch [432344](https://review.openstack.org/#/c/432344/) in order to prevent systemd service restarts from unmounting Nova mounts - Fixes bug [1679976](https://bugs.launchpad.net/nova/+bug/1679976) with patch [453537](https://review.openstack.org/#/c/453537/) disallowing a specific and potentially bad exit code during volume mounts - Removes the requirement to support extended attributes from Nova mounts with patch [428646](https://review.openstack.org/#/c/428646/) for improved performance - - Exchanges Nova fallocate on qcow2 ephemeral images with a truncate command for improved performance with Quobyte The patches come in two versions, the pure driver and the full source patch. For Cinder these are: diff --git a/truncate_ephemeral_patch/Mitaka/truncate-ephemeral_Nova-Mitaka.patch b/truncate_ephemeral_patch/Mitaka/truncate-ephemeral_Nova-Mitaka.patch deleted file mode 100644 index 2f6446c..0000000 --- a/truncate_ephemeral_patch/Mitaka/truncate-ephemeral_Nova-Mitaka.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git nova/virt/libvirt/imagebackend.py nova/virt/libvirt/imagebackend.py -index 06a9c8f..fd73b32 100644 ---- nova/virt/libvirt/imagebackend.py -+++ nova/virt/libvirt/imagebackend.py -@@ -256,9 +256,11 @@ class Image(object): - if os.path.exists(base) and size > self.get_disk_size(base): - self.resize_image(size) - -- if (self.preallocate and self._can_fallocate() and -- os.access(self.path, os.W_OK)): -- utils.execute('fallocate', '-n', '-l', size, self.path) -+ if (self.preallocate and os.access(self.path, os.W_OK)): -+ LOG.debug('Truncating new image at %(path)s to virtual size ' -+ '(patched for Quobyte).', -+ {'path': self.path}) -+ utils.execute('truncate', '-s', size, self.path) - - def _can_fallocate(self): - """Check once per class, whether fallocate(1) is available, diff --git a/truncate_ephemeral_patch/Mitaka/truncate-ephemeral_Nova-Mitaka_full_source_tree.patch b/truncate_ephemeral_patch/Mitaka/truncate-ephemeral_Nova-Mitaka_full_source_tree.patch deleted file mode 100644 index 2ca9819..0000000 --- a/truncate_ephemeral_patch/Mitaka/truncate-ephemeral_Nova-Mitaka_full_source_tree.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git nova/tests/unit/virt/libvirt/test_imagebackend.py nova/tests/unit/virt/libvirt/test_imagebackend.py -index ac83f50..e8e242b 100644 ---- nova/tests/unit/virt/libvirt/test_imagebackend.py -+++ nova/tests/unit/virt/libvirt/test_imagebackend.py -@@ -115,9 +115,8 @@ class _ImageTestCase(object): - image.cache(fake_fetch, self.TEMPLATE_PATH, self.SIZE) - - self.assertEqual(fake_processutils.fake_execute_get_log(), -- ['fallocate -l 1 %s.fallocate_test' % self.PATH, -- 'fallocate -n -l %s %s' % (self.SIZE, self.PATH), -- 'fallocate -n -l %s %s' % (self.SIZE, self.PATH)]) -+ ['truncate -s %s %s' % (self.SIZE, self.PATH), -+ 'truncate -s %s %s' % (self.SIZE, self.PATH)]) - - def test_prealloc_image_without_write_access(self): - CONF.set_override('preallocate_images', 'space') -diff --git nova/virt/libvirt/imagebackend.py nova/virt/libvirt/imagebackend.py -index 06a9c8f..fd73b32 100644 ---- nova/virt/libvirt/imagebackend.py -+++ nova/virt/libvirt/imagebackend.py -@@ -256,9 +256,11 @@ class Image(object): - if os.path.exists(base) and size > self.get_disk_size(base): - self.resize_image(size) - -- if (self.preallocate and self._can_fallocate() and -- os.access(self.path, os.W_OK)): -- utils.execute('fallocate', '-n', '-l', size, self.path) -+ if (self.preallocate and os.access(self.path, os.W_OK)): -+ LOG.debug('Truncating new image at %(path)s to virtual size ' -+ '(patched for Quobyte).', -+ {'path': self.path}) -+ utils.execute('truncate', '-s', size, self.path) - - def _can_fallocate(self): - """Check once per class, whether fallocate(1) is available, diff --git a/truncate_ephemeral_patch/Ocata/truncate-ephemeral_Nova-Ocata.patch b/truncate_ephemeral_patch/Ocata/truncate-ephemeral_Nova-Ocata.patch deleted file mode 100644 index 6b0ee5b..0000000 --- a/truncate_ephemeral_patch/Ocata/truncate-ephemeral_Nova-Ocata.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git nova/virt/libvirt/imagebackend.py nova/virt/libvirt/imagebackend.py -index 8dd227e..eaf5c81 100644 ---- nova/virt/libvirt/imagebackend.py -+++ nova/virt/libvirt/imagebackend.py -@@ -232,9 +232,11 @@ class Image(object): - if os.path.exists(base) and size > self.get_disk_size(base): - self.resize_image(size) - -- if (self.preallocate and self._can_fallocate() and -- os.access(self.path, os.W_OK)): -- utils.execute('fallocate', '-n', '-l', size, self.path) -+ if (self.preallocate and os.access(self.path, os.W_OK)): -+ LOG.debug('Truncating new image at %(path)s to virtual size ' -+ '(patched for Quobyte).', -+ {'path': self.path}) -+ utils.execute('truncate', '-s', size, self.path) - - def _can_fallocate(self): - """Check once per class, whether fallocate(1) is available, diff --git a/truncate_ephemeral_patch/Ocata/truncate-ephemeral_Nova-Ocata_full_source_tree.patch b/truncate_ephemeral_patch/Ocata/truncate-ephemeral_Nova-Ocata_full_source_tree.patch deleted file mode 100644 index b9bb9df..0000000 --- a/truncate_ephemeral_patch/Ocata/truncate-ephemeral_Nova-Ocata_full_source_tree.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git nova/tests/unit/virt/libvirt/test_imagebackend.py nova/tests/unit/virt/libvirt/test_imagebackend.py -index b3cc277..2c6dff9 100644 ---- nova/tests/unit/virt/libvirt/test_imagebackend.py -+++ nova/tests/unit/virt/libvirt/test_imagebackend.py -@@ -120,9 +120,8 @@ class _ImageTestCase(object): - image.cache(fake_fetch, self.TEMPLATE_PATH, self.SIZE) - - self.assertEqual(fake_processutils.fake_execute_get_log(), -- ['fallocate -l 1 %s.fallocate_test' % self.PATH, -- 'fallocate -n -l %s %s' % (self.SIZE, self.PATH), -- 'fallocate -n -l %s %s' % (self.SIZE, self.PATH)]) -+ ['truncate -s %s %s' % (self.SIZE, self.PATH), -+ 'truncate -s %s %s' % (self.SIZE, self.PATH)]) - - def test_prealloc_image_without_write_access(self): - CONF.set_override('preallocate_images', 'space') -diff --git nova/virt/libvirt/imagebackend.py nova/virt/libvirt/imagebackend.py -index 8dd227e..eaf5c81 100644 ---- nova/virt/libvirt/imagebackend.py -+++ nova/virt/libvirt/imagebackend.py -@@ -232,9 +232,11 @@ class Image(object): - if os.path.exists(base) and size > self.get_disk_size(base): - self.resize_image(size) - -- if (self.preallocate and self._can_fallocate() and -- os.access(self.path, os.W_OK)): -- utils.execute('fallocate', '-n', '-l', size, self.path) -+ if (self.preallocate and os.access(self.path, os.W_OK)): -+ LOG.debug('Truncating new image at %(path)s to virtual size ' -+ '(patched for Quobyte).', -+ {'path': self.path}) -+ utils.execute('truncate', '-s', size, self.path) - - def _can_fallocate(self): - """Check once per class, whether fallocate(1) is available, diff --git a/truncate_ephemeral_patch/Pike/truncate-ephemeral_Nova-Pike.patch b/truncate_ephemeral_patch/Pike/truncate-ephemeral_Nova-Pike.patch deleted file mode 100644 index baece2d..0000000 --- a/truncate_ephemeral_patch/Pike/truncate-ephemeral_Nova-Pike.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git nova/virt/libvirt/imagebackend.py nova/virt/libvirt/imagebackend.py -index bc7f05c..737a1a9 100644 ---- nova/virt/libvirt/imagebackend.py -+++ nova/virt/libvirt/imagebackend.py -@@ -246,9 +246,11 @@ class Image(object): - if os.path.exists(base) and size > self.get_disk_size(base): - self.resize_image(size) - -- if (self.preallocate and self._can_fallocate() and -- os.access(self.path, os.W_OK)): -- utils.execute('fallocate', '-n', '-l', size, self.path) -+ if (self.preallocate and os.access(self.path, os.W_OK)): -+ LOG.debug('Truncating new image at %(path)s to virtual size ' -+ '(patched for Quobyte).', -+ {'path': self.path}) -+ utils.execute('truncate', '-s', size, self.path) - - def _can_fallocate(self): - """Check once per class, whether fallocate(1) is available, diff --git a/truncate_ephemeral_patch/Pike/truncate-ephemeral_Nova-Pike_full_source_tree.patch b/truncate_ephemeral_patch/Pike/truncate-ephemeral_Nova-Pike_full_source_tree.patch deleted file mode 100644 index 6cfea3f..0000000 --- a/truncate_ephemeral_patch/Pike/truncate-ephemeral_Nova-Pike_full_source_tree.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git nova/tests/unit/virt/libvirt/test_imagebackend.py nova/tests/unit/virt/libvirt/test_imagebackend.py -index a083a2c..9757ff8 100644 ---- nova/tests/unit/virt/libvirt/test_imagebackend.py -+++ nova/tests/unit/virt/libvirt/test_imagebackend.py -@@ -120,9 +120,8 @@ class _ImageTestCase(object): - image.cache(fake_fetch, self.TEMPLATE_PATH, self.SIZE) - - self.assertEqual(fake_processutils.fake_execute_get_log(), -- ['fallocate -l 1 %s.fallocate_test' % self.PATH, -- 'fallocate -n -l %s %s' % (self.SIZE, self.PATH), -- 'fallocate -n -l %s %s' % (self.SIZE, self.PATH)]) -+ ['truncate -s %s %s' % (self.SIZE, self.PATH), -+ 'truncate -s %s %s' % (self.SIZE, self.PATH)]) - - def test_prealloc_image_without_write_access(self): - CONF.set_override('preallocate_images', 'space') -diff --git nova/virt/libvirt/imagebackend.py nova/virt/libvirt/imagebackend.py -index bc7f05c..737a1a9 100644 ---- nova/virt/libvirt/imagebackend.py -+++ nova/virt/libvirt/imagebackend.py -@@ -246,9 +246,11 @@ class Image(object): - if os.path.exists(base) and size > self.get_disk_size(base): - self.resize_image(size) - -- if (self.preallocate and self._can_fallocate() and -- os.access(self.path, os.W_OK)): -- utils.execute('fallocate', '-n', '-l', size, self.path) -+ if (self.preallocate and os.access(self.path, os.W_OK)): -+ LOG.debug('Truncating new image at %(path)s to virtual size ' -+ '(patched for Quobyte).', -+ {'path': self.path}) -+ utils.execute('truncate', '-s', size, self.path) - - def _can_fallocate(self): - """Check once per class, whether fallocate(1) is available, diff --git a/truncate_ephemeral_patch/README.md b/truncate_ephemeral_patch/README.md deleted file mode 100644 index 0b1d69d..0000000 --- a/truncate_ephemeral_patch/README.md +++ /dev/null @@ -1,28 +0,0 @@ - -## truncate-ephemeral_patch - -This patch changes Nova ephemeral image prealloc behaviour by running truncate instead of fallocate. This improves performance with ephemeral images on Quobyte volumes. -This change may have a possible performance impact on other backends. - -The patch comes in two versions: - -1. _truncate-ephemeral_-Pike.patch_ - The pure driver patch for patching package based installations that strip tests and other development elements -2. _truncate-ephemeral_-Pike_full_source_tree.patch_ - The full source patch including updates of unit tests and release notes files - - -### Installation - -The patch usage is slightly different for both versions (pure driver vs. full source patch). The difference resides in the -p parameter for the patch command and is applied as follows: - -#### Usage for the pure driver patch - -This patch can be applied by navigating to the Cinder project package root directory and running: - - patch -p1 < /path/to/patchfile - - -#### Usage for the full source tree driver patch - -This patch can be applied by navigating to the Cinder project source root directory and running: - - patch -p0 < /path/to/patchfile diff --git a/xattr-removal_patch/README.md b/xattr-removal_patch/README.md index 42abf68..5f5ad67 100644 --- a/xattr-removal_patch/README.md +++ b/xattr-removal_patch/README.md @@ -5,13 +5,13 @@ Backports of performance optimizations that remove the usage of xattr from the N Both flavors come in two versions, the vanilla release : -1. _xattr-removal_Nova-.patch_ - The pure driver patch for patching package based installations that strip tests and other development elements -2. _xattr-removal_-Mitaka_full_source_tree.patch_ - The full source patch including updates of unit tests and release notes files +1. _xattr-removal_Nova-RELEASENAME.patch_ - The pure driver patch for patching package based installations that strip tests and other development elements +2. _xattr-removal_RELEASENAME-Mitaka_full_source_tree.patch_ - The full source patch including updates of unit tests and release notes files And the _upon-systemd-run-patch_ versions: -1. _xattr-removal_Nova-_upon-systemd-run-patch.patch_ - The pure driver patch for patching package based installations that strip tests and other development elements -2. _xattr-removal_-Mitaka_upon-systemd-run-patch_full_source_tree.patch_ - The full source patch including updates of unit tests and release notes files +1. _xattr-removal_Nova-RELEASENAME_upon-systemd-run-patch.patch_ - The pure driver patch for patching package based installations that strip tests and other development elements +2. _xattr-removal_RELEASENAME-Mitaka_upon-systemd-run-patch_full_source_tree.patch_ - The full source patch including updates of unit tests and release notes files ### Installation