RBD: Run flatten in a different thread when cloning a volume
The current implementation of create_cloned_volume calls flatten
directly, and this makes whole thread of cinder-volume blocked by that
flatten call. This causes heartbeat timeout in RabbitMQ when cloning
a volume with rbd backend.
This patch makes sure that flatten is executed in a different thread,
to allow heatbeat thread to run while flattening a rbd image.
Closes-Bug: #1898918
Change-Id: I9f28260008117abcebfc96dbe69bf892f5cd14fe
(cherry picked from commit bafe440b9418a1e3acd00456872d4d97a9c64c61)
(cherry picked from commit f1521d82d941e711f6ef248a7eb81f096de8135f)
Reviewed: https:/ /review. opendev. org/758440 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=223b3c7b0f6 14fc4a5e0e8e961 2f10bb0de0ba55
Committed: https:/
Submitter: Zuul
Branch: stable/ussuri
commit 223b3c7b0f614fc 4a5e0e8e9612f10 bb0de0ba55
Author: Takashi Kajinami <email address hidden>
Date: Wed Oct 7 09:55:32 2020 +0900
RBD: Run flatten in a different thread when cloning a volume
The current implementation of create_ cloned_ volume calls flatten
directly, and this makes whole thread of cinder-volume blocked by that
flatten call. This causes heartbeat timeout in RabbitMQ when cloning
a volume with rbd backend.
This patch makes sure that flatten is executed in a different thread,
to allow heatbeat thread to run while flattening a rbd image.
Closes-Bug: #1898918 bcebfc96dbe69bf 892f5cd14fe 3acd00456872d4d 97a9c64c61) 1f6ef248a7eb81f 096de8135f)
Change-Id: I9f28260008117a
(cherry picked from commit bafe440b9418a1e
(cherry picked from commit f1521d82d941e71